[opensuse-buildservice] Need help to build package - ramlog
Hello, I would like to build the following application in opensuse build service (against factory repo both 32 and 64 bit) and I need step by step guide to setup, compile and build the rpms in the build service . Thankyou Glenn So far I have got some details. - Details of the project > http://freshmeat.net/projects/ramlog/ and http://tofu3.szm.sk/ramlog/ - An account on opensuse build service on which to build it. - Rpm source code (I don't know which one to use out of these to use for the build process)
http://tofu3.szm.sk/ramlog/1.1.0/rpm/ramlog-1.1.0-1.noarch.rpm or http://tofu3.szm.sk/ramlog/1.1.0/rpm/ramlog-1.1.0-1.src.rpm or http://tofu3.szm.sk/ramlog/1.1.0/ramlog-1.1.0-1.tar.gz
- Changelog details > http://tofu3.szm.sk/ramlog/changelog.txt - Contents of the spec file gotten from source (see below) #rpm -qlp ramlog-1.1.0-1.src.rpm ramlog-1.1.0-1.tar.gz ramlog.spec # rpm -ivhU ramlog-1.1.0-1.src.rpm 1:ramlog warning: user jandrejkovic does not exist - using root warning: group jandrejkovic does not exist warning: user jandrejkovic does not exist warning: group jandrejkovic does not exist # # ramlog.spec contents # # cat /usr/src/packages/SPECS/ramlog.spec Summary: ramlog daemon places /var/log into ramdisk on startup and copies it back to harddisk on shutdown Name: ramlog Version: 1.1.0 Release: 1 License: GPL v3 Group: System Environment/Daemons Source: %{name}-%{version}-%{release}.tar.gz #Source0: %{name}-%{version}-%{release}.tar.gz #Source1: ramlog.8.gz #Source2: ramlog.cron #Source3: %{name}-%{version}-%{release} ##Patch: ramlog1.0.0.patch BuildRoot: /var/tmp/%{name}-buildroot Requires: coreutils, e2fsprogs, util-linux, gawk, lsof, grep, chkconfig Packager: Jan Andrejkovic BuildArch: noarch %description ramlog act as system daemon. On startup it creates ramdisk, it copies files from /var/log into ramdisk and mounts ramdisk as /var/log. All logs after that will be updated on ramdisk. On shutdown it saves log files back to harddisk so logs are consistent. If you restart the service, ramlog saves content of ramdisk do harddisk, so logs are not lost in case of power outage or kernel panic. Install ramlog if you have enough of free memory and you want to keep your logs on ramdisk. It is good for notebook users, for systems with UPS or for systems running from flash - to save some write cycles. %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT mkdir -p -m 755 $RPM_BUILD_ROOT/etc/rc.d/init.d mkdir -p -m 755 $RPM_BUILD_ROOT/usr/share/man/man8/ mkdir -p -m 755 $RPM_BUILD_ROOT/etc/cron.daily install -m 644 ramlog.8.gz $RPM_BUILD_ROOT/usr/share/man/man8/ramlog.8.gz install -m 755 ramlog.cron $RPM_BUILD_ROOT/etc/cron.daily/ramlog install -m 755 %{name}-%{version}-%{release} $RPM_BUILD_ROOT/etc/rc.d/init.d/ramlog [ $? -ne 0 ] && (echo Error: ramlog was not installed successfully; exit 1) %pre #Below check is not needed if the same version of ramlog is beeing installed, however if new version is installed #it is always better to uninstall properly first, otherwise if new feature is introduced, uninstall may not work properly if [ -f /var/tmp/ramlog_uninstall_flag_file ]; then echo ramlog was not completely uninstalled, you have to restart the system first\! exit 1 fi #[ -f /var/tmp/ramlog_uninstall_flag_file ] && rm -f /var/tmp/ramlog_uninstall_flag_file exit 0 %post logsize=`du -c /var/log | tail -1 | awk {'print $1'}` logsizemax=$(($logsize+$logsize/100*35)) #add 35% logsizemax=$(($logsizemax/1000*1000+1000)) #round to megabytes memtotal=`cat /proc/meminfo | grep MemTotal: | awk '{print $2}'` memleft=$(($memtotal-$logsizemax)) #My formula: (Total memory - (logsize + 35%)) > 256 M [ $memleft -lt 256000 ] && { echo Error: Not enough memory - Total memory is $memtotal kbytes, logsize is $logsize kbytes; exit 1; } if [ -f /sbin/new-kernel-pkg ]; then if [ `/sbin/new-kernel-pkg --help 2>&1 | grep -e --update | wc -l` -eq 1 ]; then /sbin/new-kernel-pkg --kernel-args=ramdisk_size=$logsizemax --update `uname -r` else /sbin/new-kernel-pkg --kernel-args=ramdisk_size=$logsizemax --install `uname -r` fi else echo "ramlog: Warning: You have to add kernel parameter ramdisk_size manually. Estimated value is $memleft, so you add \"ramdisk_size=$memleft\" as a kernel paramter to your boot manager configuration file - such as grub.conf or lilo.conf" fi #/bin/sed -i -e "s/^RAMDISKSIZE=[0-9][0-9]*/RAMDISKSIZE=${logsizemax}/g" /etc/rc.d/init.d/ramlog /sbin/chkconfig --add %{name} /sbin/chkconfig %{name} on %preun cp /etc/rc.d/init.d/ramlog /etc/rc.d/init.d/ramlog.uninst %postun if [ -f /sbin/new-kernel-pkg ]; then /sbin/new-kernel-pkg --remove-args=ramdisk_size --update `uname -r` else echo "ramlog: Warning: You have to remove/update kernel parameter ramdisk_size in your grub.conf or lilo.conf manually." fi mv /etc/rc.d/init.d/ramlog.uninst /etc/rc.d/init.d/ramlog /sbin/chkconfig --add %{name} /sbin/chkconfig %{name} on /sbin/service %{name} uninstall %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) #%doc README TODO COPYING ChangeLog %doc README COPYING ChangeLog INSTALL FAQ VERSION /etc/rc.d/init.d/ramlog /etc/cron.daily/ramlog /usr/share/man/man8/ramlog.8.gz %changelog * Sun Jun 08 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - version 1.1.0 released: - added support for Ubuntu - added support for SELinux - now ramlog saves security context of all files in /var/log - logs are saved to HDD even if stop is not successful - added logging feature - created .deb package for Ubuntu - fixed some bugs * Wed Jan 13 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - first version 1.0.0 released - created .rpm package -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 7/20/2009 at 10:21, <doiggl@velocitynet.com.au> wrote: Hello, I would like to build the following application in opensuse build service (against factory repo both 32 and 64 bit) and I need step by step guide to setup, compile and build the rpms in the build service . Thankyou Glenn
Hi, This is just to get you quick-started. You'll probably want to invest time after to understand the spec file and to be able to make modifications. But having a first success is always a good motivator. As you have an src.rpm, the 'simplest' quick start would be for you to use this one. You can unpack it with unrpm and then upload the .tar.gz and the .spec to your package on the OBS. If the spec / src-rpm is generic enough, this will give you a resulting package. Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Dominique Leuenberger wrote:
On 7/20/2009 at 10:21, <doiggl@velocitynet.com.au> wrote:
Hello, I would like to build the following application in opensuse build service (against factory repo both 32 and 64 bit) and I need step by step guide to setup, compile and build the rpms in the build service . Thankyou Glenn
Hi,
This is just to get you quick-started. You'll probably want to invest time after to understand the spec file and to be able to make modifications. But having a first success is always a good motivator.
As you have an src.rpm, the 'simplest' quick start would be for you to use this one. You can unpack it with unrpm and then upload the .tar.gz and the .spec to your package on the OBS.
If the spec / src-rpm is generic enough, this will give you a resulting package.
Dominique
You can get a basic idea of spec files at http://www.rpm.org/max-rpm/ Regards Dave P -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, I logged into opensuse build service (obs) and shows my login on the first line at the top. I filled in the Name: Title: and Description: ,as required. I pressed "Create Project" and got the warning/error message below: OpenSUSE Webclient Error: Error Details: Errorcode: create_project_no_permission Message: not allowed to create new project 'ramlog' What am I missing ? Thanks Glenn Dominique wrote:
Hi,
This is just to get you quick-started. You'll probably want to invest time after to understand the spec file and to be able to make modifications. But having a first success is always a good motivator.
As you have an src.rpm, the 'simplest' quick start would be for you to use this one. You can unpack it with unrpm and then upload the .tar.gz and the .spec to your package on the OBS.
If the spec / src-rpm is generic enough, this will give you a resulting package.
Dominique
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 7/20/2009 at 12:04, <doiggl@velocitynet.com.au> wrote: Hello, I logged into opensuse build service (obs) and shows my login on the first line at the top. I filled in the Name: Title: and Description: ,as required. I pressed "Create Project" and got the warning/error message below:
OpenSUSE Webclient Error:
Error Details: Errorcode: create_project_no_permission Message: not allowed to create new project 'ramlog'
What am I missing ? Thanks
you don't want to make a new project, you only want to create a new package inside your home: project. In the upper right corner select 'Home Project' and the 'Add package' Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, Thanks for the info. Next I uploaded the spec file - result added ok I tried to upload the - result added ok - Filename (leave empty to take from upload or uri): Left it empty - Local File: Left it empty - Remote File URI: http://tofu3.szm.sk/ramlog/1.1.0/ramlog-1.1.0-1.tar.gz - result added ok package url: https://build.opensuse.org/package/show?package=ramlog&project=home%3Adoiggl Question: Now do I trigger a build by pressing [Trigger Rebuild], or do I just wait ? Current status is "Build Status unavailable" Thanks Glenn Dominique wrote:
As you have an src.rpm, the 'simplest' quick start would be for you to use this one. You can unpack it with unrpm and then upload the .tar.gz and the .spec to your package on the OBS.
If the spec / src-rpm is generic enough, this will give you a resulting package.
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 7/20/2009 at 16:48, <doiggl@velocitynet.com.au> wrote: Question: Now do I trigger a build by pressing [Trigger Rebuild], or do I just wait ? Current status is "Build Status unavailable" Thanks Glenn
Just wait. The scheduler will pick it up. This can sometimes take a while (especially now OBS is a little bit busy). Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, I had to add ramlog.8.gz it was inside file ramlog-1.1.0-1.tar.gz It was added to the file list ok. Question: Now do I trigger a build by pressing [Trigger Rebuild], or do I just wait ? Current status is fail (because it could not find ramlog.8.gz) package ->https://build.opensuse.org/package/show?package=ramlog&project=home%3Adoiggl Glenn Dominique wrote
Just wait. The scheduler will pick it up. This can sometimes take a while (especially now OBS is a little bit busy).
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
doiggl@velocitynet.com.au wrote:
Hello, I had to add ramlog.8.gz it was inside file ramlog-1.1.0-1.tar.gz It was added to the file list ok.
Question: Now do I trigger a build by pressing [Trigger Rebuild], or do I just wait ? Current status is fail (because it could not find ramlog.8.gz) package ->https://build.opensuse.org/package/show?package=ramlog&project=home%3Adoiggl Glenn
Dominique wrote
Just wait. The scheduler will pick it up. This can sometimes take a while (especially now OBS is a little bit busy).
no you don't need trigger you must add %prep section with %setup macro for extract tarball (e.g. before %install section):
%prep %setup -q -c %{name} -q -- less verbose -c create directory, because your tarball doesn't looks health :( see http://www.rpm.org/max-rpm/s1-rpm-inside-macros.html -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Thanks for the info. I added the following 2 lines before the %install section - see shall how that goes. %prep %setup -c %{ramlog-1.1.0-1.tar.gz} Other: https://build.opensuse.org/package/show?package=ramlog&project=home%3Adoiggl https://build.opensuse.org/project/monitor?project=home%3Adoiggl Glenn Michal Seben wrote:
you must add %prep section with %setup macro for extract tarball (e.g. before %install section):
%prep %setup -q -c %{name}
-q -- less verbose -c create directory, because your tarball doesn't looks health :(
see http://www.rpm.org/max-rpm/s1-rpm-inside-macros.html -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello I made another change, 2 lines added before the %install section in the ramlog.spec # %prep # %setup -c %{name} I Triggered a rebuild. The result was this: ----------------------------------------------------------------- ----- building ramlog.spec (user abuild) ----------------------------------------------------------------- ----------------------------------------------------------------- + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --define 'disturl obs://build.opensuse.org/home:doiggl/openSUSE_Factory/44950a54c52ea954cc9fbeb6079e5e33-ramlog' /usr/src/packages/SOURCES/ramlog.spec error: File /usr/src/packages/SOURCES/ramlog-1.1.0-6.1.tar.gz: No such file or directory System halted. Question: How do I get the file(ramlog-1.1.0-6.1.tar.gz) unpacked in correct location ?. I have the file(ramlog-1.1.0-1.tar.gz) attached to the "Files Add" location (visiable on the page in the files section) I Must be missing something in the ramlog.spec Any help most welcome. Glenn Package details https://build.opensuse.org/package/view_file?file=ramlog.spec&package=ramlog&project=home%3Adoiggl
Michal Seben wrote:
you must add %prep section with %setup macro for extract tarball (e.g. before %install section):
%prep %setup -q -c %{name}
-q -- less verbose -c create directory, because your tarball doesn't looks health :(
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
doiggl@velocitynet.com.au wrote:
Hello I made another change, 2 lines added before the %install section in the ramlog.spec
# %prep # %setup -c %{name}
I Triggered a rebuild.
The result was this: ----------------------------------------------------------------- ----- building ramlog.spec (user abuild) ----------------------------------------------------------------- ----------------------------------------------------------------- + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --define 'disturl obs://build.opensuse.org/home:doiggl/openSUSE_Factory/44950a54c52ea954cc9fbeb6079e5e33-ramlog' /usr/src/packages/SOURCES/ramlog.spec error: File /usr/src/packages/SOURCES/ramlog-1.1.0-6.1.tar.gz: No such file or directory System halted.
Question: How do I get the file(ramlog-1.1.0-6.1.tar.gz) unpacked in correct location ?.
I have the file(ramlog-1.1.0-1.tar.gz) attached to the "Files Add" location (visiable on the page in the files section) I Must be missing something in the ramlog.spec Any help most welcome. Glenn
Package details https://build.opensuse.org/package/view_file?file=ramlog.spec&package=ramlog&project=home%3Adoiggl
Michal Seben wrote:
you must add %prep section with %setup macro for extract tarball (e.g. before %install section):
%prep %setup -q -c %{name}
-q -- less verbose -c create directory, because your tarball doesn't looks health :(
problem is that you mixed %release tag from spec, with your tarball name and %release tag is managed (incremented) by obs, so you should not use this tag in your package name I created submitrequest 15094, also with other changes to see diff use : #osc request show --diff 15094 for accept use #osc request accept 15094 if you don't won't accept them use #osc request decline 15094 check also warnings after build and http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros for post/pre install macros -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, Another application I'm interested in building is called Cricket v1.0.5 Home url: http://cricket.sourceforge.net/ GPL: http://cricket.sourceforge.net/license.php Documentation: http://cricket.sourceforge.net/support/doc/ Download: http://cricket.sourceforge.net/download/ So far its unpacked and it fails on command useradd and I suspect the userdel command will fail too. The build log so far says: Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/cricket-1.0.5-11.1-root Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/cricket-1.0.5-11.1-root Wrote: /usr/src/packages/SRPMS/cricket-1.0.5-11.1.src.rpm Wrote: /usr/src/packages/RPMS/x86_64/cricket-1.0.5-11.1.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.11461 + umask 022 + cd /usr/src/packages/BUILD + cd cricket-1.0.5 + /bin/rm -rf /var/tmp/cricket-1.0.5-11.1-root + exit 0 ... checking for files with abuild user/group ... running 00-check-install-rpms ... installing all built rpms Preparing packages for installation... /var/tmp/rpm-tmp.11461: line 3: useradd: command not found error: %pre(cricket-1.0.5-11.1.x86_64) scriptlet failed, exit status 127 error: install: %pre scriptlet failed (2), skipping cricket-1.0.5-11.1 failed to install rpms, aborting build System halted. The spec file (cricket.spec&) has in it: %pre id cricket >/dev/null 2>&1 if [ $? -ne 0 ]; then useradd -r -d %{_libdir}/%{name} -c "Cricket SNMP Monitor" cricket fi %postun if [ $1 -eq 0 ]; then userdel cricket fi Other info: # which useradd /usr/sbin/useradd # which userdel /usr/sbin/userdel Build log -> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=cricket&project=home%3Adoiggl&repository=openSUSE_Factory cricket.spec -> https://build.opensuse.org/package/view_file?file=cricket.spec&package=cricket&project=home%3Adoiggl Question: How can I ensure the 'useradd' and 'userdel' routines in the %pre and %postun sections run without error and do I get those commands enabled ?. Thanks Glenn -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi,
On 7/22/2009 at 13:39, <doiggl@velocitynet.com.au> wrote: /var/tmp/rpm-tmp.11461: line 3: useradd: command not found error: %pre(cricket-1.0.5-11.1.x86_64) scriptlet failed, exit status 127 error: install: %pre scriptlet failed (2), skipping cricket-1.0.5-11.1 failed to install rpms, aborting build System halted.
Question: How can I ensure the 'useradd' and 'userdel' routines in the %pre and %postun sections run without error and do I get those commands enabled
You have to use /usr/sbin/useradd & /usr/sbin/userdel. Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Thanks Dominique - I edited the spec file and put in fully qualified commands then resubmitted the job. - Commands in the spec file now read - %pre id cricket >/dev/null 2>&1 if [ $? -ne 0 ]; then /usr/sbin/useradd -r -d %{_libdir}/%{name} -c "Cricket SNMP Monitor" cricket fi %postun if [ $1 -eq 0 ]; then /usr/sbin/userdel cricket fi - I got the following result:- in the log: + cd /usr/src/packages/BUILD + cd cricket-1.0.5 + /bin/rm -rf /var/tmp/cricket-1.0.5-12.1-root + exit 0 ... checking for files with abuild user/group ... running 00-check-install-rpms ... installing all built rpms Preparing packages for installation... /var/tmp/rpm-tmp.4324: line 3: /usr/sbin/useradd: No such file or directory error: %pre(cricket-1.0.5-12.1.x86_64) scriptlet failed, exit status 127 error: install: %pre scriptlet failed (2), skipping cricket-1.0.5-12.1 failed to install rpms, aborting build System halted. It still could not find /usr/sbin/useradd I'm puzzled about that. I must be still missing something. Any help welcome Glenn https://build.opensuse.org/package/show?package=cricket&project=home%3Adoiggl Dominique wrote:
You have to use /usr/sbin/useradd & /usr/sbin/userdel.
Dominique
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 7/22/2009 at 15:40, <doiggl@velocitynet.com.au> wrote:
It still could not find /usr/sbin/useradd I'm puzzled about that. I must be still missing something. Any help welcome Glenn https://build.opensuse.org/package/show?package=cricket&project=home%3Adoiggl
RPM in plus needs to be instructed to make sure those packages are installed before the scripts run. Put in the preamble PreReq: pwdutils this should then be enough (not sure if the buildRoot honrs this. Otherwise it will in plus require a BuildRequires: pwdutils). Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Thanks Dominique What bits do I need to change in the spec file to install the pwdutils package. So far the spec file is listed here. https://build.opensuse.org/package/view_file?file=cricket.spec&package=cricket&project=home%3Adoiggl What section name do I put the PreReq commands in Have you an example on what it should look like please. Thankyou Glenn
Dominique wrote RPM in plus needs to be instructed to make sure those packages are installed before the scripts run. Put in the preamble PreReq: pwdutils
this should then be enough (not sure if the buildRoot honrs this. Otherwise it will in plus require a BuildRequires: pwdutils).
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 7/22/2009 at 17:38, <doiggl@velocitynet.com.au> wrote: Thanks Dominique What bits do I need to change in the spec file to install the pwdutils package. So far the spec file is listed here. https://build.opensuse.org/package/view_file?file=cricket.spec&package=cricke t&project=home%3Adoiggl What section name do I put the PreReq commands in Have you an example on what it should look like please.
this would have to go in the so-called preamble. That's the part of the spec file that contains all the BuildRequires. A spec file that already uses useradd would be the one from gdm. https://build.opensuse.org/package/view_file?file=gdm.spec&package=gdm&project=openSUSE%3AFactory hope this helps you, Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Thanks Dominique, I added these two lines to the cricket.spec file # For groupadd, useradd, userdel PreReq: pwdutils https://build.opensuse.org/package/view_file?file=cricket.spec&package=cricket&project=home%3Adoiggl Shall see how it goes. Glenn Dominique wrote:
this would have to go in the so-called preamble. That's the part of the spec file that contains all the BuildRequires. A spec file that already uses useradd would be the one from gdm.
https://build.opensuse.org/package/view_file?file=gdm.spec&package=gdm&project=openSUSE%3AFactory
hope this helps you
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, Looks like I need to install osc package/rpm #osc request accept 15094 -bash: /usr/libexec/pk-command-not-found: No such file or directory Up till now Ive just using the Webclient to do things. Cheers Glenn
problem is that you mixed %release tag from spec, with your tarball name and %release tag is managed (incremented) by obs, so you should not use this tag in your package name
I created submitrequest 15094, also with other changes to see diff use : #osc request show --diff 15094 for accept use #osc request accept 15094 if you don't won't accept them use #osc request decline 15094
check also warnings after build and http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros for post/pre install macros
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
You can also try MonoOSC who have submit reqest support. 2009/7/22 <doiggl@velocitynet.com.au>:
Hello, Looks like I need to install osc package/rpm
#osc request accept 15094 -bash: /usr/libexec/pk-command-not-found: No such file or directory
Up till now Ive just using the Webclient to do things. Cheers Glenn
problem is that you mixed %release tag from spec, with your tarball name and %release tag is managed (incremented) by obs, so you should not use this tag in your package name
I created submitrequest 15094, also with other changes to see diff use : #osc request show --diff 15094 for accept use #osc request accept 15094 if you don't won't accept them use #osc request decline 15094
check also warnings after build and http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros for post/pre install macros
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- Cordially. Small Eric Quotations of the days: --------------------------------------------------------------------------- If one day one reproaches you that your work is not a work of professional, say you that: Amateurs built the arch of Noah, and professionals the Titanic. --------------------------------------------------------------------------- When society feel down, to be quiet we say, at this time every things are okay's, because the most important is the landing. --------------------------------------------------------------------------- No key was wounded during the drafting of this message. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Thanks I accepted the request, will await the result and see what happens. Glenn # osc request accept 15094 <status code="ok" /> Petit Eric wrote:
problem is that you mixed %release tag from spec, with your tarball name and %release tag is managed (incremented) by obs, so you should not use this tag in your package name
I created submitrequest 15094, also with other changes to see diff use : #osc request show --diff 15094 for accept use #osc request accept 15094 if you don't won't accept them use #osc request decline 15094
check also warnings after build and http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros for post/pre install macros -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, To resolve the following error: My plan is to add in the following two lines in the ramlog.spec which I need to unpack the ramlog-1.1.0.tar.gz first. %prep %setup -q -c %{name} Reference https://build.opensuse.org/package/view_file?file=ramlog.spec&package=ramlog&project=home%3Adoiggl Glenn
Dominique wrote you must add %prep section with %setup macro for extract tarball (e.g. before %install section)
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello
From the rpmlint report which items are the really easy ones to fix. Can anyone provide any hints on how these should be coded in. Which are the really important ones to fix ?. Thanks Glenn
Log: https://build.opensuse.org/package/live_build_log?arch=x86_64&package=ramlog&project=home%3Adoiggl&repository=openSUSE_Factory RPMLINT report: =============== ramlog.src: W: %install-no-mkdir-buildroot Your install section removes the buildroot but does not create them afterwards in a secure way, which allows attackers to trivially play tricks with symlinks on you. use mkdir %buildroot (no -p option!) or don't clean the buildroot in %install, because that's anyway already done for you by rpm. ramlog.src:17: W: hardcoded-packager-tag Jan The Packager tag is hardcoded in your spec file. It should be removed, so as to use rebuilder's own defaults. ramlog.src:15: W: hardcoded-path-in-buildroot-tag /var/tmp/%{name}-buildroot A path is hardcoded in your Buildroot tag. It should be replaced by %{_tmppath}/%{name}-%{version}-build. ramlog.noarch: W: incoherent-subsys /etc/init.d/ramlog $prog The filename of your lock file in /var/lock/subsys/ is incoherent with your actual init script name. For example, if your script name is httpd, you have to use 'httpd' as the filename in your subsys directory. It is also possible that rpmlint gets this wrong, especially if the init script contains nontrivial shell variables and/or assignments. These cases usually manifest themselves when rpmlint reports that the subsys name starts a with '$'; in these cases a warning instead of an error is reported and you should check the script manually. ramlog.noarch: W: init-script-without-%stop_on_removal-preun /etc/init.d/ramlog The init script should have a %preun script that calls %stop_on_removal. ramlog.noarch: W: missing-dependency-to-cron for cron script /etc/cron.daily/ramlog This package installs a file in /etc/cron.*/ but doesn't require cron to be installed. as cron is not part of the essential packages, your package should explicitely require cron to make sure that your cron job is executed. If it is an optional feature of your package, recommend or suggest cron. ramlog.src: W: no-%build-section The spec file does not contain a %build section. Even if some packages don't directly need it, section markers may be overridden in rpm's configuration to provide additional "under the hood" functionality, such as injection of automatic -debuginfo subpackages. Add the section, even if empty. ramlog.noarch: W: no-version-in-last-changelog ramlog.src: W: no-version-in-last-changelog The last changelog entry doesn't contain a version. Please insert the version that is coherent with the version of the package and rebuild it. 2 packages and 0 specfiles checked; 0 errors, 9 warnings. ... creating baselibs ... saving built packages /usr/src/packages/RPMS/noarch/ramlog-1.1.0-15.1.noarch.rpm /usr/src/packages/SRPMS/ramlog-1.1.0-15.1.src.rpm ... comparing built packages with the former built /usr/lib/build/rpm-check.sh compare /.build.oldpackages/ramlog-1.1.0-14.1.src.rpm /usr/src/packages/SRPMS/ramlog-1.1.0-15.1.src.rpm ramlog.spec differs ( ASCII English text) --- old/ramlog.spec 2009-07-26 02:15:33.000000000 +0000 +++ new/ramlog.spec 2009-07-26 02:15:33.000000000 +0000 @@ -34,7 +34,7 @@ %setup -q -c %{name} %install -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT +## [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT mkdir -p -m 755 $RPM_BUILD_ROOT/etc/init.d mkdir -p -m 755 $RPM_BUILD_ROOT/usr/share/man/man8/ build20 finished "build ramlog.spec" at Sun Jul 26 02:15:33 UTC 2009. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, on Montag, 27. Juli 2009, doiggl@velocitynet.com.au wrote:
From the rpmlint report which items are the really easy ones to fix. Can anyone provide any hints on how these should be coded in.
You can find some information about rpmlint warnings on http://en.opensuse.org/Packaging/RpmLint In many cases, reading the rpmlint messages should give you the information you need.
Which are the really important ones to fix ?.
Basically all of them ;-)
ramlog.src: W: %install-no-mkdir-buildroot Your install section removes the buildroot but does not create them afterwards in a secure way, which allows attackers to trivially play tricks with symlinks on you. use mkdir %buildroot (no -p option!) or don't clean the buildroot in %install, because that's anyway already done for you by rpm.
Remove those lines from your spec ## [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT and it should work.
ramlog.src:17: W: hardcoded-packager-tag Jan The Packager tag is hardcoded in your spec file. It should be removed, so as to use rebuilder's own defaults.
Remove this line: Packager: Jan Andrejkovic (Note: Maybe you'll get a new warning about missing packager tag then - ignore it ;-)
ramlog.src:15: W: hardcoded-path-in-buildroot-tag /var/tmp/%{name}-buildroot A path is hardcoded in your Buildroot tag. It should be replaced by %{_tmppath}/%{name}-%{version}-build.
Self-explaining - change the BuildRoot: setting as described.
ramlog.noarch: W: incoherent-subsys /etc/init.d/ramlog $prog The filename of your lock file in /var/lock/subsys/ is incoherent with your actual init script name. For example, if your script name is httpd, you have to use 'httpd' as the filename in your subsys directory. It is also possible that rpmlint gets this wrong, especially if the init script contains nontrivial shell variables and/or assignments. These cases usually manifest themselves when rpmlint reports that the subsys name starts a with '$'; in these cases a warning instead of an error is reported and you should check the script manually.
Basically self-explaining - and might be a false positive. Check that your initscript really uses /var/lock/subsys/ramlog as lock file. If this is the case, this is a false positive.
ramlog.noarch: W: init-script-without-%stop_on_removal-preun /etc/init.d/ramlog The init script should have a %preun script that calls %stop_on_removal.
Self-explaining: Add a new section to your spec: %preun %stop_on_removal
ramlog.noarch: W: missing-dependency-to-cron for cron script /etc/cron.daily/ramlog This package installs a file in /etc/cron.*/ but doesn't require cron to be installed. as cron is not part of the essential packages, your package should explicitely require cron to make sure that your cron job is executed. If it is an optional feature of your package, recommend or suggest cron.
Add "cron" to Requires, Recommends or Suggests - depending on how hard your script depends on the daily cronjob.
ramlog.src: W: no-%build-section The spec file does not contain a %build section. Even if some packages don't directly need it, section markers may be overridden in rpm's configuration to provide additional "under the hood" functionality, such as injection of automatic -debuginfo subpackages. Add the section, even if empty.
Self-explaining - add a %build section.
ramlog.noarch: W: no-version-in-last-changelog ramlog.src: W: no-version-in-last-changelog The last changelog entry doesn't contain a version. Please insert the version that is coherent with the version of the package and rebuild it.
Basically self-explaining, but could be a false positive since your changelog contains %changelog * Sun Jun 08 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - version 1.1.0 released: Regards, Christian Boltz -- Next I can reboot and install witouth the need to burn a DVD. Remember that then [the local installation source] should be on a partition you are not going to format, because it is very hard to read data from a partition you just formatted. ;-) [houghi in opensuse] -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, Thanks for the info Christian. Two warnings to go. I get a warning message on the change log content (no-version-in-last-changelog) Currently the lines says * Sun Jun 08 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - version 1.1.0 released: * Wed Jan 13 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - first version 1.0.0 released What should the line look like, do you have an example ? I did not see an entry for 'no-version-in-last-changelog' in this list: http://en.opensuse.org/Packaging/RpmLint Can it be added in with a example. Cheers Glenn RPMLINT report: =============== ramlog.noarch: W: incoherent-subsys /etc/init.d/ramlog $prog The filename of your lock file in /var/lock/subsys/ is incoherent with your actual init script name. For example, if your script name is httpd, you have to use 'httpd' as the filename in your subsys directory. It is also possible that rpmlint gets this wrong, especially if the init script contains nontrivial shell variables and/or assignments. These cases usually manifest themselves when rpmlint reports that the subsys name starts a with '$'; in these cases a warning instead of an error is reported and you should check the script manually. ramlog.noarch: W: no-version-in-last-changelog ramlog.src: W: no-version-in-last-changelog The last changelog entry doesn't contain a version. Please insert the version that is coherent with the version of the package and rebuild it. Other Info ---------- https://build.opensuse.org/package/live_build_log?arch=x86_64&package=ramlog&project=home%3Adoiggl&repository=openSUSE_Factory https://build.opensuse.org/package/show?package=ramlog&project=home%3Adoiggl Pasted in what current changelog looks like %changelog * Sun Jun 08 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - version 1.1.0 released: - added support for Ubuntu - added support for SELinux - now ramlog saves security context of all files in /var/log - logs are saved to HDD even if stop is not successful - added logging feature - created .deb package for Ubuntu - fixed some bugs * Wed Jan 13 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - first version 1.0.0 released - created .rpm package -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, Can a search feature be provided to search existing .spec files in the opensuse build service to assist people. Thanks Glenn -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Donnerstag, 20. August 2009 16:12:33 schrieb doiggl@velocitynet.com.au:
Hello, Can a search feature be provided to search existing .spec files in the opensuse build service to assist people.
How should this look alike ? I mean, you can already search for packages, isn't this enough ? bye adrian -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hello, Thanks for all your help to date. I'm just going the RPMLINT report messages and have these two left to resolve:
ramlog.noarch: W: no-version-in-last-changelog ramlog.src: W: no-version-in-last-changelog The last changelog entry doesn't contain a version. Please insert the version that is coherent with the version of the package and rebuild it.
Question: Currently the following is in the changelog section, it looks o.k to me I see a version number , what should the lines be formatted like ,or what am I missing ? %changelog * Sun Jun 08 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - version 1.1.0 released: - added support for Ubuntu - added support for SELinux - now ramlog saves security context of all files in /var/log - logs are saved to HDD even if stop is not successful - added logging feature - created .deb package for Ubuntu - fixed some bugs * Wed Jan 13 2008 Jan Andrejkovic <jandrejkovic@gmail.com> - first version 1.0.0 released - created .rpm package Question:The next one I need an example on this can be fixed, can you provide an example ? ramlog.noarch: W: incoherent-subsys /etc/init.d/ramlog $prog The filename of your lock file in /var/lock/subsys/ is incoherent with your actual init script name. For example, if your script name is httpd, you have to use 'httpd' as the filename in your subsys directory. It is also possible that rpmlint gets this wrong, especially if the init script contains nontrivial shell variables and/or assignments. These cases usually manifest themselves when rpmlint reports that the subsys name starts a with '$'; in these cases a warning instead of an error is reported and you should check the script manually. The content of the built rpm listing is as follows: # rpm -qlp ramlog-1.1.0-19.1.noarch.rpm warning: ramlog-1.1.0-19.1.noarch.rpm: Header V3 DSA signature: NOKEY, key ID fb666c9e /etc/cron.daily/ramlog /etc/init.d/ramlog /usr/share/doc/packages/ramlog /usr/share/doc/packages/ramlog/COPYING /usr/share/doc/packages/ramlog/ChangeLog /usr/share/doc/packages/ramlog/FAQ /usr/share/doc/packages/ramlog/INSTALL /usr/share/doc/packages/ramlog/README /usr/share/doc/packages/ramlog/VERSION /usr/share/man/man8/ramlog.8.gz References https://build.opensuse.org/package/show?package=ramlog&project=home%3Adoiggl https://build.opensuse.org/package/view_file?file=ramlog.spec&package=ramlog&project=home%3Adoiggl Thanks Glenn -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
<doiggl@velocitynet.com.au> writes:
Hello, I had to add ramlog.8.gz it was inside file ramlog-1.1.0-1.tar.gz It was added to the file list ok.
Question: Now do I trigger a build by pressing [Trigger Rebuild], or do I just wait ? Current status is fail (because it could not find ramlog.8.gz) package ->https://build.opensuse.org/package/show?package=ramlog&project=home%3Adoiggl Glenn
You'd need to uncomment the corresponding Source: line, so obs knows this file is relevant for the build. then the rebuild would be automatic. And actually you should (in the build) just copy the man page from the unpacked tar ball to it's destination (as you already do with the other files. S. -- Susanne Oberhauser +49-911-74053-574 SUSE -- a Novell Business OPS Engineering Maxfeldstraße 5 Processes and Infrastructure Nürnberg SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (8)
-
Adrian Schröter
-
Christian Boltz
-
Dave Plater
-
doiggl@velocitynet.com.au
-
Dominique Leuenberger
-
Michal Seben
-
Petit Eric
-
Susanne Oberhauser