Results 1 to 8 of 8

Thread: How to make _service file download the specified package version?

  1. #1
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default How to make _service file download the specified package version?

    I have a _service file as shown below, I want it to download openmoji-12.1.0.
    However, the content of the file after download I found is 12.2.0.

    How do I make it download the 12.1.0?

    Thanks.

    Code:
    <services>
      <service mode="localonly" name="obs_scm">
        <param name="url">git://github.com/hfg-gmuend/openmoji.git</param>
        <param name="scm">git</param>
        <param name="versionformat">12.1.0</param>
      </service>
      <service mode="localonly" name="tar" />
      <service mode="localonly" name="recompress">
        <param name="file">*.tar</param>
        <param name="compression">xz</param>
      </service>
      <service mode="localonly" name="set_version" />
    </services>

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,112
    Blog Entries
    15

    Default Re: How to make _service file download the specified package version?

    Hi
    Add the revision/tag

    Code:
    <param name="revision">12.1.0</param>
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: How to make _service file download the specified package version?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Add the revision/tag

    Code:
    <param name="revision">12.1.0</param>
    Thanks.

    Another question, there is many other files include the source code.
    Instead of downloading the source I want to download CozetteVector.otf instead.

    I tried
    Code:
    <param name="filename">CozetteVector.otf</param>
    But it just rename the source code file and not download the file I want. Thanks.

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,112
    Blog Entries
    15

    Default Re: How to make _service file download the specified package version?

    Hi
    That's a build time font? What about https://github.com/slavfox/Cozette
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: How to make _service file download the specified package version?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Add the revision/tag

    Code:
    <param name="revision">12.1.0</param>
    Quote Originally Posted by malcolmlewis View Post
    Hi
    That's a build time font? What about https://github.com/slavfox/Cozette
    Build time font?

    The font in my screenshot is https://github.com/slavfox/Cozette as you linked.
    My question is how to make _service download the .otf or .ttf instead of the default source code in the github repo?

  6. #6
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: How to make _service file download the specified package version?

    I managed to download the CozetteVector.otf file with <service name="download_files">

    Code:
    <services>
      <service mode="localonly" name="obs_scm">
        <param name="url">git://github.com/slavfox/Cozette.git</param>
        <param name="scm">git</param>
        <param name="revision">7882aee</param>
        <param name="versionprefix">1.4.0+git</param>
        <param name="versionformat">%ct.%h</param>
      </service>
      <service mode="localonly" name="tar" />
      <service mode="localonly" name="recompress">
        <param name="file">*.tar</param>
        <param name="compression">xz</param>
      </service>
      <service mode="localonly" name="set_version" />
      <service mode="localonly" name="download_files" />
        <param name="versionprefix">1.4.0+git</param>
    </services>
    The files in directory are shown below.

    Code:
    ls
    Cozette                                       cozette-fonts.changes  CozetteVector.otf
    Cozette-1.4.0+git.1581781581.7882aee.obscpio  cozette-fonts.spec     _service
    Cozette-1.4.0+git.1581781581.7882aee.tar.xz   Cozette.obsinfo
    But how do I take CozetteVector.otf and put it in %{_ttfontsdir}?
    The

    Code:
    %reconfigure_fonts_prereq
    
    %description
    A bitmap font with great coverage of all the glyphs
    that might encounter in the terminal.
    
    %prep
    %setup -q -n %{fontname}-%{version} 
    %setup -q -n CozetteVector.otf
    
    %build
    
    %install
    mkdir -p %{buildroot}%{_ttfontsdir}
    install -m 0644 *.otf %{buildroot}%{_ttfontsdir}/
    
    %reconfigure_fonts_scriptlets
    
    %files
    %{_ttfontsdir}
    
    %license LICENSE
    %doc CHANGELOG.md README.md
    
    %changelog
    It is looking for CozetteVector.otf inside the archive source file which of course does not exist because I download it separately.

    Code:
    [    2s] + cd CozetteVector.otf
    [    2s] /var/tmp/rpm-tmp.x9neir: line 44: cd: CozetteVector.otf: No such file or directory
    How do I make it recognized my CozetteVector.otf outside of the .tar.xz?

    Complete spec file shown below.

    Code:
    #
    # spec file for package cozette-fonts
    #
    # Copyright (c) 2020 SUSE LLC
    #
    # All modifications and additions to the file contributed by third parties
    # remain the property of their copyright owners, unless otherwise agreed
    # upon. The license for this file, and modifications and additions to the
    # file, is the same license as for the pristine package itself (unless the
    # license for the pristine package is not an Open Source License, in which
    # case the license is the MIT License). An "Open Source License" is a
    # license that conforms to the Open Source Definition (Version 1.9)
    # published by the Open Source Initiative.
    
    # Please submit bugfixes or comments via https://bugs.opensuse.org/
    #
    
    %define ttf_fontdir %{_datadir}/fonts/truetype
    %define fontname    Cozette
    %define opentypefont    CozetteVector
    %define fontversion    1.4.0
    Name:           cozette-fonts
    Version:        1.4.0+git.1581781581.7882aee
    Release:        0
    Summary:        A bitmap programming font
    License:        MIT
    Group:          System/X11/Fonts
    URL:            https://github.com/slavfox/Cozette
    Source0:        Cozette-%{version}.tar.xz
    Source1: %{url}/releases/download/v.%{fontversion}/CozetteVector.otf
    BuildRequires:  %{suseconfig_fonts_prereq}
    BuildRequires:  fontpackages-devel
    BuildArch:      noarch
    %reconfigure_fonts_prereq
    
    %description
    A bitmap font with great coverage of all the glyphs
    that might encounter in the terminal.
    
    %prep
    %setup -q -n %{fontname}-%{version} 
    %setup -q -n CozetteVector.otf
    
    %build
    
    %install
    mkdir -p %{buildroot}%{_ttfontsdir}
    install -m 0644 *.otf %{buildroot}%{_ttfontsdir}/
    
    %reconfigure_fonts_scriptlets
    
    %files
    %{_ttfontsdir}
    
    %license LICENSE
    %doc CHANGELOG.md README.md
    
    %changelog

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,112
    Blog Entries
    15

    Default Re: How to make _service file download the specified package version?

    Hi
    Your not building the font? It's a binary blob.....

    The following does everything, create directory etc
    Code:
    install -Dm0644 %{S:1} %{buildroot}%{_ttfontsdir}/CozetteVector.otf
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: How to make _service file download the specified package version?

    I fix it

    Just do this

    Code:
    %install
    mkdir -p %{buildroot}%{_ttfontsdir}
    install -m 0644 %{SOURCE1} %{buildroot}%{_ttfontsdir}/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •