| |
@@ -1,8 +1,8 @@
|
| |
#!/bin/bash
|
| |
# @group: Generic
|
| |
# @name: generic-srv-opt
|
| |
- # @url: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_documentation
|
| |
- # @text: Packages must not store files under /srv, /opt or /usr/local
|
| |
+ # @url: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_no_files_or_directories_under_srv_usrlocal_or_homeuser
|
| |
+ # @text: Packages must not store files under /srv, /opt, /usr/local, /home
|
| |
# @type: MUST
|
| |
|
| |
if unpack_rpms; then
|
| |
@@ -12,15 +12,17 @@
|
| |
[ -d "$rpm/opt" ] && opt_rpms=( $rpm ${opt_rpms[@]} )
|
| |
[ -d "$rpm/srv" ] && srv_rpms=( $rpm ${srv_rpms[@]} )
|
| |
[ -d "$rpm/usr/local" ] && local_rpms=( $rpm ${local_rpms[@]} )
|
| |
+ [ -d "$rpm/home" ] && home_rpms=( $rpm ${home_rpms[@]} )
|
| |
done
|
| |
|
| |
- test -z "${opt_rpms[*]}${srv_rpms[*]}${local_rpms[*]}" && \
|
| |
+ test -z "${opt_rpms[*]}${srv_rpms[*]}${local_rpms[*]}${home_rpms[*]}" && \
|
| |
exit $FR_PASS
|
| |
|
| |
echo "Rpm(s) have files under /srv, /opt or /usr/local:"
|
| |
for rpm in ${opt_rpms[@]}; do echo " /opt $rpm"; done
|
| |
for rpm in ${srv_rpms[@]}; do echo " /srv $rpm"; done
|
| |
for rpm in ${local_rpms[@]}; do echo " /usr/local $rpm"; done
|
| |
+ for rpm in ${home_rpms[@]}; do echo " /home $rpm"; done
|
| |
exit $FR_FAIL
|
| |
else
|
| |
echo "Cannot unpack rpms (using --prebuilt?)"
|
| |
I've updated the banned directory check to also include
/home
. Whilst I have updated the actual test to validate that this is working, I'm unsure of the best way to update the RPM that's being tested. I'd appreciate some guidance on this please, as currently the test does not pass on this branch.