Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35

Thread: Atom spec file is not building an RPM or SRPM; why?

  1. #11
    Join Date
    Sep 2012
    Posts
    5,016

    Default Re: Atom spec file is not building an RPM or SRPM; why?

    Quote Originally Posted by fusion809 View Post
    To my surprise, while I saw no error messages (the output so great in size that it could not fit in the 1,000 lines kept in memory by Konsole)
    There is tee, there is script. You must capture build log to be able to fix build problems.
    no RPM or SRPM packages were built in /home/makerpm/rpmbuild/RPMS or /home/makerpm/rpmbuild/SRPMS, respectively.
    What is the value of _topdir (rpm --eval %_topdir)?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    There should be a build log somewhere
    rpmbuild does not leave any build logs, all messages go to standard output (may be stderr).

  2. Default Re: Atom spec file is not building an RPM or SRPM; why?

    Quote Originally Posted by arvidjaar View Post
    There is tee, there is script. You must capture build log to be able to fix build problems.

    What is the value of _topdir (rpm --eval %_topdir)?


    rpmbuild does not leave any build logs, all messages go to standard output (may be stderr).
    _topdir is /home/makerpm/rpmbuild.

    I am now rebuilding this package and capturing the logs, if that helps, the process usually takes half an hour to an hour, so please bare with me.

  3. #13
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,649
    Blog Entries
    15

    Default Re: Atom spec file is not building an RPM or SRPM; why?

    Quote Originally Posted by fusion809 View Post
    Thanks again, I managed to copy it across, but now errors are being encountered at the %install stage:
    Code:
    + QA_CHECK_RPATHS=1
    + case "${QA_CHECK_RPATHS:-}" in
    + /usr/lib/rpm/check-rpaths
    + /usr/lib/rpm/check-buildroot
    /home/makerpm/rpmbuild/BUILDROOT/atom-1.4.3-0.x86_64/usr/share/applications/atom.desktop:Exec=/home/makerpm/rpmbuild/BUILDROOT/atom-1.4.3-0.x86_64/usr/share/atom/atom %U
    /home/makerpm/rpmbuild/BUILDROOT/atom-1.4.3-0.x86_64/usr/share/applications/atom.desktop:Icon=/home/makerpm/rpmbuild/BUILDROOT/atom-1.4.3-0.x86_64/usr/share/atom/resources/app.asar.unpacked/resources/atom.png
    Found '/home/makerpm/rpmbuild/BUILDROOT/atom-1.4.3-0.x86_64' in installed files; aborting
    error: Bad exit status from /var/tmp/rpm-tmp.kTwfWa (%install)
    
    
    
    
    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.kTwfWa (%install)
    guessing this indicates that some of %{_sed} command will need to be run in the %prep stage on the atom.desktop file to make it suitable for the RPM.
    Hi
    Ahh it's adding the buildroot into the desktop file, so in the %prep section add;
    Code:
    sed -i 's/<%= installDir %>/\/usr/g' resources/linux/atom.desktop.in 
    sed -i 's/<%= iconPath %>/atom/g' resources/linux/atom.desktop.in
    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!

  4. Default Re: Atom spec file is not building an RPM or SRPM; why?

    It failed too, I'm afraid. I captured the output using:
    Code:
    rpmbuild -ba atom.spec > output.txt 2> errors.txt
    output.txt is here (http://paste2.org/AdznFUtd) and errors.txt is here (http://paste2.org/W2008MeL). If there's a better way to capture the output please tell me, I'm only using this method as it is the only one I know that gets all the output.

  5. #15
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,649
    Blog Entries
    15

    Default Re: Atom spec file is not building an RPM or SRPM; why?

    Hi
    Updated spec file to fix the errors, plus your one isn't building anything;
    http://paste.opensuse.org/view/raw/ff8391e8

    or use;
    Code:
    wget -O atom.spec http://paste.opensuse.org/view/download/ff8391e8
    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!

  6. Default Re: Atom spec file is not building an RPM or SRPM; why?

    Ah, there's an error in this atom.spec file, namely this line (line #29):
    Code:
    sed -i
    I say so as building this spec file gives a sed usage message (i.e., the manual entry that indicates how to use sed).

  7. #17
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,649
    Blog Entries
    15

    Default Re: Atom spec file is not building an RPM or SRPM; why?

    Quote Originally Posted by fusion809 View Post
    Ah, there's an error in this atom.spec file, namely this line (line #29):
    Code:
    sed -i
    I say so as building this spec file gives a sed usage message (i.e., the manual entry that indicates how to use sed).
    Ahh my bad;
    http://paste.opensuse.org/view/raw/c379d90f

    or;
    Code:
    wget -O atom.spec http://paste.opensuse.org/view/download/c379d90f
    Just built locally on a Leap test machine, all good, just use zypper to install the rpm
    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. Default Re: Atom spec file is not building an RPM or SRPM; why?

    It worked perfectly, thanks a million! Thanks to you, I have found this forum far more newbie-friendly than the Arch forums, so thanks.

  9. #19
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,649
    Blog Entries
    15

    Default Re: Atom spec file is not building an RPM or SRPM; why?

    Quote Originally Posted by fusion809 View Post
    It worked perfectly, thanks a million! Thanks to you, I have found this forum far more newbie-friendly than the Arch forums, so thanks.
    Hi
    Your welcome We are a pretty friendly bunch here

    I'm guessing the earlier errors you were having would have been related to the npm building, not sure why they need to build....
    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!

  10. Default Re: Atom spec file is not building an RPM or SRPM; why?

    Hi malcomlewis, I'm afraid this issue has returned. Here is the spec file I was originally using:
    Code:
    Name:           atom
    Version:        1.5.1
    Release:        0
    Summary:        A hackable text editor for the 21st century
    License:        MIT
    Group:          Productivity/Publishing/Other
    Url:            https://atom.io/
    Source0:        %{name}-%{version}.tar.gz
    BuildRequires:  git-core
    BuildRequires:  hicolor-icon-theme
    BuildRequires:  npm
    BuildRequires:  nodejs-packaging
    BuildRequires:  libgnome-keyring-devel
    BuildRequires:  python-setuptools
    BuildRequires:  update-desktop-files
    # MANUAL BEGIN
    Requires:       nodejs
    Requires:       python-http-parser
    # MANUAL END
    BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    
    
    %description
    Atom is a text editor that's modern, approachable, yet hackable to the core
    - a tool you can customize to do anything but also use productively without
    ever touching a config file.
    
    
    %prep
    %setup -q
    sed -i -e 's/<%= appName %>/Atom/g' \
          -e "s/<%= description %>/%{description}/g" \
          -e 's/<%= installDir %>/\/usr/g' \
          -e 's|/usr/share/<%= appFileName %>/atom %U|/usr/bin/atom %U|g' \
          -e 's/<%= iconPath %>/atom/g' \
          -e 's|text/plain;|application/javascript;application/json;application/postscript;application/x-csh;application/x-desktop;application/x-httpd-eruby;application/x-httpd-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/x-latex;application/x-msdos-program;application/x-ruby;application/x-sh;application/x-shellscript;application/x-sql;application/x-tcl;application/x-tex;application/xhtml+xml;application/xml;application/xml-dtd;application/xslt+xml;text/css;text/csv;text/html;text/plain;text/xml;text/xml-dtd;text/x-asm;text/x-bibtex;text/x-boo;text/x-c++;text/x-c++hdr;text/x-c++src;text/x-c;text/x-chdr;text/x-csh;text/x-csrc;text/x-dsrc;text/x-diff;text/x-eiffel;text/x-fortran;text/x-go;text/x-haskell;text/x-java;text/x-java-source;text/x-lua;text/x-makefile;text/x-markdown;text/x-objc;text/x-pascal;text/x-perl;text/x-php;text/x-python;text/x-ruby;text/x-scala;text/x-scheme;text/x-sh;text/x-tcl;text/x-tex;text/x-vala;text/yaml;|g' \
          resources/linux/atom.desktop.in
    
    
    %build
    # Hardened package
    export CFLAGS="%{optflags} -fPIC -pie"
    export CXXFLAGS="%{optflags} -fPIC -pie"
    until ./script/build 2>&1; do :; done
    
    
    %install
    script/grunt install --install-dir "%{buildroot}%{_prefix}"
    # copy over icons in sizes that most desktop environments like
    for i in 1024 512 256 128 64 48 32 24 16; do
        install -Dm 0644 /tmp/atom-build/icons/${i}.png \
          %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
    done
    %suse_update_desktop_file %{name}
    
    
    %post
    %desktop_database_post
    %icon_theme_cache_post
    
    
    %postun
    %desktop_database_postun
    %icon_theme_cache_postun
    
    
    %files
    %defattr(-,root,root,-)
    %doc README.md docs/
    %{license} LICENSE.md
    %{_bindir}/atom
    %{_bindir}/apm
    %dir %{_datadir}/atom
    %{_datadir}/atom/*
    %{_datadir}/applications/atom.desktop
    %{_datadir}/icons/hicolor/*/apps/%{name}.png
    %exclude %{_datadir}/%{name}/libgcrypt.so.*
    %exclude %{_datadir}/%{name}/libnotify.so.*
    
    
    %changelog
    it returns this error:
    Code:
    WARNING: '/usr/lib/rpm/brp-desktop.data/suse-screensavers.menu' does not exist
    WARNING: '/usr/lib/rpm/brp-desktop.data/applications-kmenuedit.menu' does not exist
    WARNING: '/usr/lib/rpm/brp-desktop.data/custom.menu' does not exist
    ERROR: No sufficient Category definition: /home/makerpm/rpmbuild/BUILDROOT/atom-1.5.1-0.x86_64//usr/share/applications/atom.desktop 
    Errors in installed desktop file detected. Please refer to http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros
    error: Bad exit status from /var/tmp/rpm-tmp.MngPiD (%install)
    now removing
    Code:
    %suse_update_desktop_file %{name}
    from this spec file doesn't fix it. The desktop file generated by the sed line is perfectly except the
    Code:
    -e "s/<%= description %>/%{description}/g" \
    is not being parsed the way I was hoping it would (i.e., with <%= description %> being replaced with the description provided under %description in the spec file).


    Thanks for your time, I really do appreciate it. I have read http://en.opensuse.org/SUSE_Package_...ons/RPM_Macros but it didn't help me as my desktop file is fine as it is (the %suse_update_desktop_file macro seems to make modifications to the desktop file), except for this sed issue.
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Seven favourite distros
    : Arch, Fedora, Gentoo, openSUSE Tumbleweed and Void.

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

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