[opensuse-packaging] need help with .spec file
Hello, I am interested in getting the following package into the opensuse build service (obs). It is called Cricket. Home page: http://cricket.sourceforge.net/ So far I have started to create a project, extracted the files and uploaded them. Currently the build fails. Can someone have a look at the cricket.spec for me and let me know what needs changing/adding/removing please. Project -> https://build.opensuse.org/package/show?package=cricket&project=home%3Adoiggl Specfile -> https://api.opensuse.org/source/home:doiggl/cricket/cricket.spec Last Logfile -> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=cricket&project=home%3Adoiggl&repository=openSUSE_Factory Any assistance welcome Cheers Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Dienstag, 18. August 2009 08:26:40 schrieb doiggl@velocitynet.com.au:
Hello, I am interested in getting the following package into the opensuse build service (obs). It is called Cricket.
Home page: http://cricket.sourceforge.net/ So far I have started to create a project, extracted the files and uploaded them.
Currently the build fails.
Can someone have a look at the cricket.spec for me and let me know what needs changing/adding/removing please.
Project -> https://build.opensuse.org/package/show?package=cricket&project=home%3Adoig gl
Specfile -> https://api.opensuse.org/source/home:doiggl/cricket/cricket.spec
Last Logfile -> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=crick et&project=home%3Adoiggl&repository=openSUSE_Factory
The log file tells you: cricket-1.0.5-23.1.x86_64.rpm: directories not owned by a package: - /etc/httpd - /etc/httpd/conf.d So just add %dir /etc/httpd %dir /etc/httpd/conf.d to the %file section -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 8/18/2009 at 9:51, Adrian Schröter<adrian@suse.de> wrote: Am Dienstag, 18. August 2009 08:26:40 schrieb doiggl@velocitynet.com.au: Hello, I am interested in getting the following package into the opensuse build service (obs). It is called Cricket.
Home page: http://cricket.sourceforge.net/ So far I have started to create a project, extracted the files and uploaded them.
Currently the build fails.
Can someone have a look at the cricket.spec for me and let me know what needs changing/adding/removing please.
Project -> https://build.opensuse.org/package/show?package=cricket&project=home%3Adoig gl
Specfile -> https://api.opensuse.org/source/home:doiggl/cricket/cricket.spec
Last Logfile -> https://build.opensuse.org/package/live_build_log?arch=x86_64&package=crick et&project=home%3Adoiggl&repository=openSUSE_Factory
The log file tells you:
cricket-1.0.5-23.1.x86_64.rpm: directories not owned by a package: - /etc/httpd - /etc/httpd/conf.d
So just add %dir /etc/httpd %dir /etc/httpd/conf.d
to the %file section
Adrian, Glenn won't this just result in the next brp error: /etc/httpd no longer allowed? The build target is Factory; we're using /etc/apache2 for a while now. The sysconfdir variables have to be properly reworked for such a case. There should be not to long ago a post in the -buildservice ML for this usecase [0]. Dominique [0] http://lists.opensuse.org/opensuse-buildservice/2009-08/msg00144.html -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello, Thanks Dominique and Adrian for the info, your correct about the errors. So far I've added to the specfile the following:- BuildRequires: pwdutils , apache2-devel %define apache apache2 %define apache_libexecdir %(%{apxs} -q LIBEXECDIR) %define apache_sysconfdir %(%{apxs} -q SYSCONFDIR) %define apache_includedir %(%{apxs} -q INCLUDEDIR) %define apache_serverroot %(%{apxs} -q PREFIX) %define apache_localstatedir %(%{apxs} -q LOCALSTATEDIR) %define apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN) %pre id cricket >/dev/null 2>&1 if [ $? -ne 0 ]; then /usr/sbin/useradd -r -d %{_libdir}/%{name} -c "cricket id" cricket /usr/sbin/groupadd apache fi %postun if [ $1 -eq 0 ]; then /usr/sbin/userdel cricket /usr/sbin/groupdel apache fi I resubmitted to build, the log now shows:- (using //.build.log) ... running 03-check-binary-kernel-log ... running 04-check-filelist ... checking filelist cricket: "/etc/httpd/conf.d/cricket.conf" is not allowed anymore in SuSE Linux. cricket: "/var/cricket" is not allowed anymore in FHS 2.2. cricket: "/var/cricket/cache" is not allowed anymore in FHS 2.2. cricket: "/var/cricket/config" is not allowed anymore in FHS 2.2. cricket: "/var/cricket/data" is not allowed anymore in FHS 2.2. cricket: "/var/cricket/etc" is not allowed anymore in FHS 2.2. cricket: "/var/cricket/etc/cricket-conf.pl" is not allowed anymore in FHS 2.2. cricket: "/var/cricket/etc/subtree-sets" is not allowed anymore in FHS 2.2. cricket: "/var/cricket/log" is not allowed anymore in FHS 2.2. cricket-1.0.5-34.1.noarch.rpm: directories not owned by a package: - /etc/httpd - /etc/httpd/conf.d System halted As was said the sysconfdir variables have to be properly reworked. I see the line '%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR) ' Question: What should it look like, and what other lines do I need in the spec file ? Spec file https://build.opensuse.org/package/view_file?file=cricket.spec&package=cricket&project=home%3Adoiggl Log file https://build.opensuse.org/package/show?package=cricket&project=home%3Adoiggl Once again thanks for all help. Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 8/19/2009 at 15:02, <doiggl@velocitynet.com.au> wrote: Hello, Thanks Dominique and Adrian for the info, your correct about the errors. (using //.build.log) ... running 03-check-binary-kernel-log ... running 04-check-filelist ... checking filelist cricket: "/etc/httpd/conf.d/cricket.conf" is not allowed anymore in SuSE
For this: you'll have to change your %install section. you have now: # # Set up an Apache config # mkdir -p %{buildroot}/etc/httpd/conf.d # cat > %{buildroot}/etc/httpd/conf.d/cricket.conf <<EOF Change it to # # Set up an Apache config # mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d # cat > %{buildroot}%{apache_sysconfdir}/conf.d/cricket.conf <<EOF For the errors with /var/cricket I'm not just sure what the right location would be. I'd suggest you have a look at the FHS Specification to find a proper place, depending on what the data is.
cricket-1.0.5-34.1.noarch.rpm: directories not owned by a package: - /etc/httpd - /etc/httpd/conf.d
This will be solved with the fix above. You'll have to change the %files section though: %config /etc/httpd/conf.d/cricket.conf has to be replace by %config %{apache_sysconfdir}/conf.d/cricket.conf Then something else in your spec file: # # added in %pre and %postun # %pre # id cricket >/dev/null 2>&1 # if [ $? -ne 0 ]; then # /usr/sbin/useradd -r -d %{_libdir}/%{name} -c "cricket id" cricket # /usr/sbin/groupadd apache # fi # # %postun # if [ $1 -eq 0 ]; then # /usr/sbin/userdel cricket # /usr/sbin/groupdel apache # fi Are you sure it's a good idea to mess with the group 'apache' ? The group name does not sound like being related to your package. And apache2 in openSUSE runs as user wwwrun / group www; those groups and users on the other hand should not be touched by your package. Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 19/08/09 09:02, doiggl@velocitynet.com.au wrote:
Hello, Thanks Dominique and Adrian for the info, your correct about the errors.
So far I've added to the specfile the following:-
BuildRequires: pwdutils , apache2-devel
%define apache apache2 %define apache_libexecdir %(%{apxs} -q LIBEXECDIR) %define apache_sysconfdir %(%{apxs} -q SYSCONFDIR) %define apache_includedir %(%{apxs} -q INCLUDEDIR) %define apache_serverroot %(%{apxs} -q PREFIX) %define apache_localstatedir %(%{apxs} -q LOCALSTATEDIR) %define apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN)
Requires: apache2 %{apache_mmn}
%pre id cricket >/dev/null 2>&1 if [ $? -ne 0 ]; then /usr/sbin/useradd -r -d %{_libdir}/%{name} -c "cricket id" cricket /usr/sbin/groupadd apache fi
%postun if [ $1 -eq 0 ]; then /usr/sbin/userdel cricket /usr/sbin/groupdel apache fi
no, do not mess with the apache group...
cricket: "/var/cricket" is not allowed anymore in FHS 2.2.
use /var/lib/%{name} instead. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Adrian Schröter
-
Cristian Rodríguez
-
doiggl@velocitynet.com.au
-
Dominique Leuenberger