To enable check option for Software quality 35/167335/2 accepted/tizen/base/20180119.133650 submit/tizen_base/20180118.050652
authorlokilee73 <changjoo.lee@samsung.com>
Wed, 17 Jan 2018 06:11:47 +0000 (15:11 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Thu, 18 Jan 2018 02:31:03 +0000 (11:31 +0900)
Change-Id: I79a2f7fb45d7892cb126d5d93d21a8dc4e7ff522
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Makefile [changed mode: 0644->0755]
files/etc/bashrc [deleted file]
files/etc/profile [deleted file]
packaging/setup.spec [changed mode: 0644->0755]
serviceslint
uidgid [deleted file]

old mode 100644 (file)
new mode 100755 (executable)
index 0c4351a..7451445
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,11 @@
 NAME=setup
-VERSION := $(shell awk '/Version:/ { print $$2 }' $(NAME).spec)
+VERSION := $(shell awk '/Version:/ { print $$2 }' packaging/$(NAME).spec)
 TAG=$(NAME)-$(VERSION)
 
 
 check:
        @echo Sanity checking selected files....
-       bash -n bashrc
-       bash -n profile
-       tcsh -f csh.cshrc
-       tcsh -f csh.login
-       ./uidgidlint ./uidgid
-       ./serviceslint ./services
+       ./serviceslint ./files/etc/services
 
 tag-archive: check
        @git tag -a -m "Tag as $(TAG)" -f $(TAG)
diff --git a/files/etc/bashrc b/files/etc/bashrc
deleted file mode 100644 (file)
index 901f5d5..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-# /etc/bashrc
-
-# System wide functions and aliases
-# Environment stuff goes in /etc/profile
-
-# It's NOT a good idea to change this file unless you know what you
-# are doing. It's much better to create a custom.sh shell script in
-# /etc/profile.d/ to make custom changes to your environment, as this
-# will prevent the need for merging in future updates.
-
-# are we an interactive shell?
-if [ "$PS1" ]; then
-  if [ -z "$PROMPT_COMMAND" ]; then
-    case $TERM in
-    xterm*)
-      if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
-          PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
-      else
-          PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
-      fi
-      ;;
-    screen)
-      if [ -e /etc/sysconfig/bash-prompt-screen ]; then
-          PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
-      else
-          PROMPT_COMMAND='printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
-      fi
-      ;;
-    *)
-      [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
-      ;;
-    esac
-  fi
-  # Turn on parallel history
-  shopt -s histappend
-  history -a
-  # Turn on checkwinsize
-  shopt -s checkwinsize
-  [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
-  # You might want to have e.g. tty in prompt (e.g. more virtual machines)
-  # and console windows
-  # If you want to do so, just add e.g.
-  # if [ "$PS1" ]; then
-  #   PS1="[\u@\h:\l \W]\\$ "
-  # fi
-  # to your custom modification shell script in /etc/profile.d/ directory
-fi
-
-if ! shopt -q login_shell ; then # We're not a login shell
-    # Need to redefine pathmunge, it get's undefined at the end of /etc/profile
-    pathmunge () {
-        case ":${PATH}:" in
-            *:"$1":*)
-                ;;
-            *)
-                if [ "$2" = "after" ] ; then
-                    PATH=$PATH:$1
-                else
-                    PATH=$1:$PATH
-                fi
-        esac
-    }
-
-    # By default, we want umask to get set. This sets it for non-login shell.
-    # Current threshold for system reserved uid/gids is 200
-    # You could check uidgid reservation validity in
-    # /usr/share/doc/setup-*/uidgid file
-    if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
-       umask 002
-    else
-       umask 022
-    fi
-
-    # Only display echos from profile.d scripts if we are no login shell
-    # and interactive - otherwise just process them to set envvars
-    for i in /etc/profile.d/*.sh; do
-        if [ -r "$i" ]; then
-            if [ "$PS1" ]; then
-                . "$i"
-            else
-                . "$i" >/dev/null
-            fi
-        fi
-    done
-
-    unset i
-    unset -f pathmunge
-fi
-# vim:ts=4:sw=4
diff --git a/files/etc/profile b/files/etc/profile
deleted file mode 100644 (file)
index 7b7fb3e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# /etc/profile
-
-# System wide environment and startup programs, for login setup
-# Functions and aliases go in /etc/bashrc
-
-# It's NOT a good idea to change this file unless you know what you
-# are doing. It's much better to create a custom.sh shell script in
-# /etc/profile.d/ to make custom changes to your environment, as this
-# will prevent the need for merging in future updates.
-#
-PS1='\u:\w> '
-
-pathmunge () {
-    case ":${PATH}:" in
-        *:"$1":*)
-            ;;
-        *)
-            if [ "$2" = "after" ] ; then
-                PATH=$PATH:$1
-            else
-                PATH=$1:$PATH
-            fi
-    esac
-}
-
-
-if [ -x /usr/bin/id ]; then
-    if [ -z "$EUID" ]; then
-        # ksh workaround
-        EUID=`id -u`
-        UID=`id -ru`
-    fi
-    USER="`id -un`"
-    LOGNAME=$USER
-    MAIL="/var/spool/mail/$USER"
-fi
-
-# Path manipulation
-if [ "$EUID" = "0" ]; then
-    pathmunge /usr/sbin
-    pathmunge /usr/local/sbin
-else
-    pathmunge /usr/local/sbin after
-fi
-
-HOSTNAME=`/usr/bin/hostname 2>/dev/null`
-HISTSIZE=1000
-if [ "$HISTCONTROL" = "ignorespace" ] ; then
-    export HISTCONTROL=ignoreboth
-else
-    export HISTCONTROL=ignoredups
-fi
-
-export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
-
-# By default, we want umask to get set. This sets it for login shell
-# Current threshold for system reserved uid/gids is 200
-# You could check uidgid reservation validity in
-# /usr/share/doc/setup-*/uidgid file
-if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
-    umask 002
-else
-    umask 022
-fi
-
-for i in /etc/profile.d/*.sh ; do
-    if [ -r "$i" ]; then
-        if [ "${-#*i}" != "$-" ]; then 
-            . "$i"
-        else
-            . "$i" >/dev/null
-        fi
-    fi
-done
-
-unset i
-unset -f pathmunge
old mode 100644 (file)
new mode 100755 (executable)
index 538a405..26e87bc
@@ -70,8 +70,6 @@ end
 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/motd
 %config(noreplace) %{_sysconfdir}/printcap
 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/inputrc
-%config(noreplace) %{_sysconfdir}/bashrc
-%config(noreplace) %{_sysconfdir}/profile
 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/protocols
 %attr(0600,root,root) %config(noreplace,missingok) %{_sysconfdir}/securetty
 %dir %{_sysconfdir}/profile.d
index b602455..f049c4f 100755 (executable)
@@ -14,7 +14,7 @@ die "Usage: $0 /etc/services\n" unless $#ARGV == 0;
 
 # Build a hash of known protocols
 my %protocol;
-open FH, "protocols" or die "cannot open protocols: $!\n";
+open FH, "files/etc/protocols" or die "cannot open protocols: $!\n";
 while (<FH>) {
        chomp;
        s/#.*$//;
diff --git a/uidgid b/uidgid
deleted file mode 100644 (file)
index b7983b7..0000000
--- a/uidgid
+++ /dev/null
@@ -1,155 +0,0 @@
-NAME   UID     GID     HOME            SHELL   PACKAGES
-root   0       0       /root           /bin/bash       setup
-bin    1       1       /bin            /sbin/nologin   setup
-daemon 2       2       /sbin           /sbin/nologin   setup
-sys    -       3       -               -       setup
-adm    3       4       /var/adm                /bin/bash       setup
-tty    -       5       -               -       setup
-disk   -       6       -               -       setup
-lp     4       7       /var/spool/lpd          /sbin/nologin   setup
-mem    -       8       -               -       setup
-kmem   -       9       -               -       setup
-wheel  -       10      -               -       setup
-cdrom  -       11      -               -       udev,MAKEDEV
-sync   5       (0)     /sbin           /bin/sync       setup
-shutdown       6       (0)     /sbin           /sbin/shutdown  setup
-halt   7       (0)     /sbin           /sbin/halt      setup
-mail   8       12      /var/spool/mail         /sbin/nologin   setup
-news   9       13      /var/spool/news         /sbin/nologin   setup
-uucp   10      14      /var/spool/uucp         /sbin/nologin   setup
-operator       11      (0)     /root           /sbin/nologin   setup
-games  12      (100)   /usr/games              /sbin/nologin   setup
-gopher 13      30      /var/gopher             /sbin/nologin   setup
-ftp    14      50      /var/ftp                /sbin/nologin   setup
-man    -       15      -               -       setup
-oprofile       16      16      /home/oprofile          /sbin/nologin   oprofile
-pkiuser        17      17      /usr/share/pki          /sbin/nologin   pki-ca,rhpki-ca
-dialout        -       18      -               -       udev,MAKEDEV
-floppy -       19      -               -       dev,MAKEDEV
-games  -       20      -               -       setup
-slocate        -       21      -               -       slocate
-utmp   -       22      -               -       initscripts,libutempter
-squid  23      23      /var/spool/squid                /dev/null       squid
-pvm    24      24      /usr/share/pvm3         /bin/bash       pvm
-named  25      25      /var/named              /bin/false      bind
-postgres       26      26      /var/lib/pgsql          /bin/bash       postgresql-server
-mysql  27      27      /var/lib/mysql          /bin/bash       mysql
-nscd   28      28      /               /bin/false      nscd
-rpcuser        29      29      /var/lib/nfs            /bin/false      nfs-utils
-console        -       31      -               -       dev
-rpc    32      32      /               /bin/false      portmap
-amandabackup   33      (6)     /var/lib/amanda         /bin/false      amanda
-tape   -       33      -               -       udev,MAKEDEV
-netdump        34      34      /var/crash              /bin/bash       netdump-client, netdump-server
-utempter       -       35      -               -       libutempter
-vdsm   36      -       /               /bin/bash       kvm, vdsm
-kvm    -       36      -               -       kvm, vdsm, libvirt
-rpm    37      37      /var/lib/rpm            /bin/bash       rpm
-ntp    38      38      /etc/ntp                /sbin/nologin   ntp
-video  -       39      -               -       setup
-dip    -       40      -               -       setup
-mailman        41      41      /var/mailman            /bin/false      mailman
-gdm    42      42      /var/gdm                /bin/bash       gdm
-xfs    43      43      /etc/X11/fs             /bin/false      XFree86-xfs
-pppusers       -       44      -               -       linuxconf
-popusers       -       45      -               -       linuxconf
-slipusers      -       46      -               -       linuxconf
-mailnull       47      47      /var/spool/mqueue               /dev/null       sendmail
-apache 48      48      /var/www                /bin/false      apache
-wnn    49      49      /home/wnn               /bin/bash       FreeWnn
-smmsp  51      51      /var/spool/mqueue               /dev/null       sendmail
-puppet 52      52      /var/lib/puppet         /sbin/nologin   puppet
-tomcat 53      53      /var/lib/tomcat         /sbin/nologin   tomcat
-lock   -       54      -               -       lockdev
-ldap   55      55      /var/lib/ldap           /bin/false      openldap-servers
-frontpage      56      56      /var/www                /bin/false      mod_frontpage
-nut    57      57      /var/lib/ups            /bin/false      nut
-beagleindex    58      58      /var/cache/beagle               /bin/false      beagle
-tss    59      59      -               /sbin/nologin   trousers
-piranha        60      60      /etc/sysconfig/ha               /dev/null       piranha
-prelude-manager        61      61      -               /sbin/nologin   prelude-manager
-snortd 62      62      -               /sbin/nologin   snortd
-audio  -       63      -               -       setup
-condor 64      64      /var/lib/condor         /sbin/nologin   condord
-nslcd  65      (55)    /               /sbin/nologin   nslcd
-wine   -       66      -               -       wine
-pegasus        66      65      /var/lib/Pegasus                /sbin/nologin   tog-pegasus
-webalizer      67      67      /var/www/html/usage             /sbin/nologin   webalizer
-haldaemon      68      68      /               /sbin/nologin   hal
-vcsa   69      69      -               /sbin/nologin   dev,MAKEDEV
-avahi  70      70      /var/run/avahi-daemon           /sbin/nologin   avahi
-realtime       -       71      -               -       -
-tcpdump        72      72      /               /sbin/nologin   tcpdump
-privoxy        73      73      /etc/privoxy            /bin/bash       privoxy
-sshd   74      74      /var/empty/sshd         /sbin/nologin   openssh-server
-radvd  75      75      /               /bin/false      radvd
-cyrus  76      (12)    /var/imap               /bin/bash       cyrus-imapd
-saslauth       -       76      -               -       cyrus-imapd
-arpwatch       77      77      /var/lib/arpwatch               /sbin/nologin   arpwatch
-fax    78      78      /var/spool/fax          /sbin/nologin   mgetty
-nocpulse       79      79      /etc/sysconfig/nocpulse         /bin/bash       nocpulse
-desktop        80      80      -               /sbin/nologin   desktop-file-utils
-dbus   81      81      /               /sbin/nologin   dbus
-jonas  82      82      /var/lib/jonas          /sbin/nologin   jonas
-clamav 83      83      /tmp            /sbin/nologin   clamav
-screen -       84      -               -       screen
-quaggavt       -       85      -               -       quagga
-sabayon        86      86      -               /sbin/nologin   sabayon
-polkituser     87      87      /               /sbin/nologin   PolicyKit
-wbpriv -       88      -               -       samba-common
-postfix        89      89      /var/spool/postfix              /bin/true       postfix
-postdrop       -       90      -               -       postfix
-majordomo      91      91      /usr/lib/majordomo              /bin/bash       majordomo
-quagga 92      92      /               /sbin/nologin   quagga
-exim   93      93      /var/spool/exim         /sbin/nologin   exim
-distcache      94      94      /               /sbin/nologin   distcache
-radiusd        95      95      /               /bin/false      freeradius
-hsqldb 96      96      /var/lib/hsqldb         /sbin/nologin   hsqldb
-dovecot        97      97      /usr/libexec/dovecot            /sbin/nologin   dovecot
-ident  98      98      /               /sbin/nologin   ident
-nobody 99      99      /               /sbin/nologin   setup
-users  -       100     -               -       setup
-qemu   107     107     /               /sbin/nologin   libvirt
-ovirt  108     108     /               /sbin/nologin   libvirt
-rhevm  109     109     /home/rhevm             /sbin/nologin   vdsm-reg
-jetty  110     110     /usr/share/jetty                /sbin/nologin   jetty
-saned  111     111     /               /sbin/nologin   sane-backends
-vhostmd        112     112     /usr/share/vhostmd              /sbin/nologin   vhostmd
-usbmuxd        113     113     /               /sbin/nologin   usbmuxd
-bacula 133     133     /var/spool/bacula               /sbin/nologin   bacula
-cimsrvr        134     134     /               /sbin/nologin   tog-pegasus-libs
-ricci  140     140     /var/lib/ricci          /sbin/nologin   ricci
-luci   141     141     /var/lib/luci           /sbin/nologin   luci
-stap-server    155     155     /var/lib/stap-server            /sbin/nologin   systemtap
-stapusr        -       156     /               -       systemtap-runtime
-stapsys        -       157     /               -       systemtap-runtime
-stapdev        -       158     /               -       systemtap-runtime
-swift  160     160     /var/lib/swift          /sbin/nologin   openstack-swift
-glance 161     161     /var/lib/glance         /sbin/nologin   openstack-glance
-nova   162     162     /var/lib/nova           /sbin/nologin   openstack-nova
-keystone       163     163     /var/lib/keystone               /sbin/nologin   openstack-keystone
-quantum        164     164     /var/lib/quantum                /sbin/nologin   openstack-quantum
-avahi-autoipd  170     170     /var/lib/avahi-autoipd          /sbin/nologin   avahi
-pulse  171     171     /var/run/pulse          /sbin/nologin   pulseaudio
-rtkit  172     172     /proc           /sbin/nologin   rtkit
-abrt   173     173     /etc/abrt               /sbin/nologin   abrt
-retrace        174     174     /usr/share/retrace-server               /sbin/nologin   retrace-server
-rhevagent      175     175     /               /sbin/nologin   rhev-agent
-ats    176     176     /               /sbin/nologin   trafficserver
-dhcpd  177     177     /               /sbin/nologin   dhcp
-myproxy        178     178     /var/lib/myproxy                /sbin/nologin   myproxy-server
-sanlock        179     179     /var/run/sanlock                /sbin/nologin   sanlock
-aeolus 180     180     /var/aeolus             /sbin/nologin   aeolus-configure
-wallaby        181     181     /var/lib/wallaby                /sbin/nologin   wallaby
-katello        182     182     /usr/share/katello              /sbin/nologin   katello-common
-elasticsearch  183     183     /usr/share/java/elasticsearch           /sbin/nologin   elasticsearch
-mongodb        184     184     /var/lib/mongodb                /sbin/nologin   mongodb
-jboss-as       185     185     /usr/share/jboss-as             /sbin/nologin   jboss-as
-jbosson-agent  186     -       /               /sbin/nologin   jboss-on-agent
-jbosson        -       186     -               -       jboss-on-agent
-openstack-heat 187     187     /var/lib/heat           /sbin/nologin   heat
-gnats  ?       ?       ?               ?       gnats, gnats-db
-listar ?       ?       ?               ?       listar
-nfsnobody      65534   65534   /var/lib/nfs            /sbin/nologin   nfs-utils
-
-# Note: nfsnobdy is 4294967294 on 64-bit platforms (-2)