[opensuse-buildservice] Should OBS always unconditionally use lint?
Hi All, In OBS at: https://github.com/openSUSE/open-build-service/blob/master/src/backend/bs_wo... the '--lint' option is unconditionally always passed to the 'build' command: push @args, '--lint'; And in the build command at: https://github.com/openSUSE/obs-build/blob/master/build#L1214 this results in 'rpmlint-Factory' being unconditionally added to $ADDITIONAL_PACKS test -z "$DO_LINT" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory" This will be case even for non rpm builds, such as Debian .dsc builds, and for target rpm distribution repositories that might have or support this additional package such Fedora. This seems clearly wrong. This will result in an invocation like: /bin/bash /usr/lib/build/init_buildsystem --configdir /usr/lib/build/configs --cachedir /var/cache/build --rpmlist /var/tmp/osc-buildpackage/rpmlist.nRE0pS /var/tmp/osc-buildpackage/my_package_1.2.3.dsc rpmlint-Factory (init_build appears to ignore the rpmlint-Factory argument, thought I'm not sure specifically why as I'm don't understand how init_build and expanddeps work, but it's clearly wrong to pass rpmlint-Factory to .dsc build targeting a Debian distribution repository) Should the above $DO_LINT test also test $BUILDTPYE to make sure it's a .spec build? (And thus not add the additional package for .dsc builds) Going even further should the '--lint' option perhaps be removed from the build command, and OBS not set this? It seems that simply using 'Support: rpmlint-Factory' in the prjconf for those projects that want and can use this would be the appropriate way to control this. (It appears the actual invocation of 'rpmlint' for .spec builds is controlled by '$DO_CHECKS' and passing '--nochecks') Thanks, Nick -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 30. Mai 2018, 10:45:38 CEST wrote Nicholas Brown:
Hi All,
In OBS at: https://github.com/openSUSE/open-build-service/blob/master/src/backend/bs_wo... the '--lint' option is unconditionally always passed to the 'build' command:
push @args, '--lint';
And in the build command at: https://github.com/openSUSE/obs-build/blob/master/build#L1214 this results in 'rpmlint-Factory' being unconditionally added to $ADDITIONAL_PACKS
test -z "$DO_LINT" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory"
This will be case even for non rpm builds, such as Debian .dsc builds, and for target rpm distribution repositories that might have or support this additional package such Fedora. This seems clearly wrong.
right, the build script part adding this package has only an effect in standalone mode, outside of osc/obs. The decision if the validation runs happens pure on the existins of the executable or not. The same is true for debian, but there it is lintian instead of rpmlint. The --lint option is just an old left over for compability... but we should indeed drop it from the worker and osc code. But we can't from build script code because we need to stay compatible basically forever ....
This will result in an invocation like:
/bin/bash /usr/lib/build/init_buildsystem --configdir /usr/lib/build/configs --cachedir /var/cache/build --rpmlist /var/tmp/osc-buildpackage/rpmlist.nRE0pS /var/tmp/osc-buildpackage/my_package_1.2.3.dsc rpmlint-Factory
(init_build appears to ignore the rpmlint-Factory argument, thought I'm not sure specifically why as I'm don't understand how init_build and expanddeps work, but it's clearly wrong to pass rpmlint-Factory to .dsc build targeting a Debian distribution repository)
Should the above $DO_LINT test also test $BUILDTPYE to make sure it's a .spec build? (And thus not add the additional package for .dsc builds)
Going even further should the '--lint' option perhaps be removed from the build command, and OBS not set this? It seems that simply using 'Support: rpmlint-Factory' in the prjconf for those projects that want and can use this would be the appropriate way to control this.
(It appears the actual invocation of 'rpmlint' for .spec builds is controlled by '$DO_CHECKS' and passing '--nochecks')
Thanks, Nick
-- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 30. Mai 2018, 11:03:12 CEST wrote Adrian Schröter:
On Mittwoch, 30. Mai 2018, 10:45:38 CEST wrote Nicholas Brown:
Hi All,
In OBS at: https://github.com/openSUSE/open-build-service/blob/master/src/backend/bs_wo... the '--lint' option is unconditionally always passed to the 'build' command:
push @args, '--lint';
And in the build command at: https://github.com/openSUSE/obs-build/blob/master/build#L1214 this results in 'rpmlint-Factory' being unconditionally added to $ADDITIONAL_PACKS
test -z "$DO_LINT" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory"
This will be case even for non rpm builds, such as Debian .dsc builds, and for target rpm distribution repositories that might have or support this additional package such Fedora. This seems clearly wrong.
right, the build script part adding this package has only an effect in standalone mode, outside of osc/obs.
The decision if the validation runs happens pure on the existins of the executable or not. The same is true for debian, but there it is lintian instead of rpmlint.
The --lint option is just an old left over for compability... but we should indeed drop it from the worker and osc code.
But we can't from build script code because we need to stay compatible basically forever ....
JFYI, I have cleaned this up now .... just ignore the switch in future ;) -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, 30 May 2018 at 10:03, Adrian Schröter <adrian@suse.de> wrote:
On Mittwoch, 30. Mai 2018, 10:45:38 CEST wrote Nicholas Brown:
Hi All,
In OBS at:
https://github.com/openSUSE/open-build-service/blob/master/src/backend/bs_wo...
the '--lint' option is unconditionally always passed to the 'build' command:
push @args, '--lint';
And in the build command at: https://github.com/openSUSE/obs-build/blob/master/build#L1214 this results in 'rpmlint-Factory' being unconditionally added to $ADDITIONAL_PACKS
test -z "$DO_LINT" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory"
This will be case even for non rpm builds, such as Debian .dsc builds, and for target rpm distribution repositories that might have or support this additional package such Fedora. This seems clearly wrong.
right, the build script part adding this package has only an effect in standalone mode, outside of osc/obs.
The decision if the validation runs happens pure on the existins of the executable or not. The same is true for debian, but there it is lintian instead of rpmlint.
The --lint option is just an old left over for compability... but we should indeed drop it from the worker and osc code.
But we can't from build script code because we need to stay compatible basically forever ....
This will result in an invocation like:
/bin/bash /usr/lib/build/init_buildsystem --configdir /usr/lib/build/configs --cachedir /var/cache/build --rpmlist /var/tmp/osc-buildpackage/rpmlist.nRE0pS /var/tmp/osc-buildpackage/my_package_1.2.3.dsc rpmlint-Factory
(init_build appears to ignore the rpmlint-Factory argument, thought I'm not sure specifically why as I'm don't understand how init_build and expanddeps work, but it's clearly wrong to pass rpmlint-Factory to .dsc build targeting a Debian distribution repository)
Should the above $DO_LINT test also test $BUILDTPYE to make sure it's a .spec build? (And thus not add the additional package for .dsc builds)
Going even further should the '--lint' option perhaps be removed from
Would a change like this be appropriate, so that it's not added for things like debian dsc builds? diff --git a/build b/build index 293fe96e33cb..5cd2cb940399 100755 --- a/build +++ b/build @@ -172,7 +172,7 @@ Known Parameters: --no-checks Do not run checks (postbuild and %check) - --lint Run rpmlint after build. + --lint Run SUSE rpmlint checks after build. --logfile logfile Capture build output to logfile. Defaults to @@ -1211,7 +1211,7 @@ for RECIPEFILE in "${RECIPEFILES[@]}" ; do test -z "$CREATE_BASELIBS" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS build" test -z "$CCACHE" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS ccache" test "$icecream" = 0 || ADDITIONAL_PACKS="$ADDITIONAL_PACKS icecream gcc-c++" - test -z "$DO_LINT" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory" + test -z "$DO_LINT" -a "$BUILDTYPE" = spec || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory" test "$VMDISK_FILESYSTEM" = xfs && ADDITIONAL_PACKS="$ADDITIONAL_PACKS libblkid1" test "$VM_TYPE" = zvm && ADDITIONAL_PACKS="$ADDITIONAL_PACKS udev libcap2" the
build command, and OBS not set this? It seems that simply using 'Support: rpmlint-Factory' in the prjconf for those projects that want and can use this would be the appropriate way to control this.
(It appears the actual invocation of 'rpmlint' for .spec builds is controlled by '$DO_CHECKS' and passing '--nochecks')
Thanks, Nick
--
Adrian Schroeter email: adrian@suse.de
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 30. Mai 2018, 11:39:27 CEST wrote Nicholas Brown:
On Wed, 30 May 2018 at 10:03, Adrian Schröter <adrian@suse.de> wrote:
On Mittwoch, 30. Mai 2018, 10:45:38 CEST wrote Nicholas Brown: ...
Would a change like this be appropriate, so that it's not added for things like debian dsc builds?
diff --git a/build b/build index 293fe96e33cb..5cd2cb940399 100755 --- a/build +++ b/build @@ -172,7 +172,7 @@ Known Parameters:
--no-checks Do not run checks (postbuild and %check)
- --lint Run rpmlint after build. + --lint Run SUSE rpmlint checks after build.
I have removed the option from the help...
--logfile logfile Capture build output to logfile. Defaults to @@ -1211,7 +1211,7 @@ for RECIPEFILE in "${RECIPEFILES[@]}" ; do test -z "$CREATE_BASELIBS" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS build" test -z "$CCACHE" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS ccache" test "$icecream" = 0 || ADDITIONAL_PACKS="$ADDITIONAL_PACKS icecream gcc-c++" - test -z "$DO_LINT" || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory" + test -z "$DO_LINT" -a "$BUILDTYPE" = spec || ADDITIONAL_PACKS="$ADDITIONAL_PACKS rpmlint-Factory"
not needed, just don't use it anymore. If you want to use any liniting, just specify the package providing the executable via the --extra-packs The execution will work for rpm and debian worlds if the matching executables are there.
test "$VMDISK_FILESYSTEM" = xfs && ADDITIONAL_PACKS="$ADDITIONAL_PACKS libblkid1" test "$VM_TYPE" = zvm && ADDITIONAL_PACKS="$ADDITIONAL_PACKS udev libcap2"
This will result in an invocation like:
/bin/bash /usr/lib/build/init_buildsystem --configdir /usr/lib/build/configs --cachedir /var/cache/build --rpmlist /var/tmp/osc-buildpackage/rpmlist.nRE0pS /var/tmp/osc-buildpackage/my_package_1.2.3.dsc rpmlint-Factory
(init_build appears to ignore the rpmlint-Factory argument, thought I'm not sure specifically why as I'm don't understand how init_build and expanddeps work, but it's clearly wrong to pass rpmlint-Factory to .dsc build targeting a Debian distribution repository)
Should the above $DO_LINT test also test $BUILDTPYE to make sure it's a .spec build? (And thus not add the additional package for .dsc builds)
Going even further should the '--lint' option perhaps be removed from the build command, and OBS not set this? It seems that simply using 'Support: rpmlint-Factory' in the prjconf for those projects that want and can use this would be the appropriate way to control this.
(It appears the actual invocation of 'rpmlint' for .spec builds is controlled by '$DO_CHECKS' and passing '--nochecks')
Thanks, Nick
--
Adrian Schroeter email: adrian@suse.de
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5 90409 Nürnberg Germany
-- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Adrian Schröter
-
Nicholas Brown