Changeset 793 in ProjectBuilder for projects/fossology
- Timestamp:
- Jun 29, 2009, 10:09:21 PM (16 years ago)
- Location:
- projects/fossology/pbconf/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/fossology/pbconf/trunk/fossology/rpm/fossology.spec
r765 r793 88 88 89 89 %post 90 # Adjust the kernel shmmax (described in detail in section 2.1.3)91 echo 512000000 > /proc/sys/kernel/shmmax92 grep -q kernel.shmmax /etc/sysctl.conf93 if [ $? -eq 0 ]; then94 perl -pi -e "s/^[#\s]*kernel.shmmax\s*=.*/kernel.shmmax=512000000/" /etc/sysctl.conf95 else96 echo "kernel.shmmax=512000000" >> /etc/sysctl.conf97 fi98 90 99 # Adjust postgresql config (described in detail in section 2.1.4) for Fossology 100 PGCONF=/var/lib/pgsql/data/postgresql.conf 101 if [ ! -f $PGCONF ]; then 102 cp /usr/share/pgsql/postgresql.conf.sample $PGCONF 103 fi 104 grep -qw listen_addresses $PGCONF 105 if [ $? -eq 0 ]; then 106 perl -pi -e "s/^[#\s]*listen_addresses.*=.*/listen_addresses = '*'/" $PGCONF 107 else 108 echo "listen_addresses = '*'" >> $PGCONF 109 fi 110 grep -qw max_connections $PGCONF 111 if [ $? -eq 0 ]; then 112 perl -pi -e "s/^[#\s]*max_connections.*=.*/max_connections = 50/" $PGCONF 113 else 114 echo "max_connections = 50" >> $PGCONF 115 fi 116 grep -qw shared_buffers $PGCONF 117 if [ $? -eq 0 ]; then 118 perl -pi -e "s/^[#\s]*shared_buffers.*=.*/shared_buffers = 32768/" $PGCONF 119 else 120 echo "shared_buffers = 32768" >> $PGCONF 121 fi 122 grep -qw work_mem $PGCONF 123 if [ $? -eq 0 ]; then 124 perl -pi -e "s/^[#\s]*work_mem.*=.*/work_mem = 10240/" $PGCONF 125 else 126 echo "work_mem = 10240" >> $PGCONF 127 fi 128 # min max_fsm_relations*16, 6 bytes each 129 grep -qw max_fsm_pages $PGCONF 130 if [ $? -eq 0 ]; then 131 perl -pi -e "s/^[#\s]*max_fsm_pages.*=.*/max_fsm_pages = 100000/" $PGCONF 132 else 133 echo "max_fsm_pages = 100000" >> $PGCONF 134 fi 135 grep -qw fsync $PGCONF 136 if [ $? -eq 0 ]; then 137 perl -pi -e "s/^[#\s]*fsync.*=.*/fsync = off/" $PGCONF 138 else 139 echo "fsync = off" >> $PGCONF 140 fi 141 # recover from partial page writes 142 grep -qw full_page_writes $PGCONF 143 if [ $? -eq 0 ]; then 144 perl -pi -e "s/^[#\s]*full_page_writes.*=.*/full_page_writes = off/" $PGCONF 145 else 146 echo "full_page_writes = off" >> $PGCONF 147 fi 148 grep -qw commit_delay $PGCONF 149 if [ $? -eq 0 ]; then 150 perl -pi -e "s/^[#\s]*commit_delay.*=.*/commit_delay = 1000/" $PGCONF 151 else 152 echo "commit_delay = 1000" >> $PGCONF 153 fi 154 grep -qw effective_cache_size $PGCONF 155 if [ $? -eq 0 ]; then 156 perl -pi -e "s/^[#\s]*effective_cache_size.*=.*/effective_cache_size = 25000/" $PGCONF 157 else 158 echo "effective_cache_size = 25000" >> $PGCONF 159 fi 160 # -1 is disabled, 0 logs all statements 161 grep -qw log_min_duration_statement $PGCONF 162 if [ $? -eq 0 ]; then 163 perl -pi -e "s/^[#\s]*log_min_duration_statement.*=.*/log_min_duration_statement = -1/" $PGCONF 164 else 165 echo "log_min_duration_statement = -1" >> $PGCONF 166 fi 167 # prepend a time stamp to all log entries 168 grep -qw log_line_prefix $PGCONF 169 if [ $? -eq 0 ]; then 170 perl -pi -e "s/^[#\s]*log_line_prefix.*=.*/log_line_prefix = '%t %h %c'/" $PGCONF 171 else 172 echo "log_line_prefix = '%t %h %c'" >> $PGCONF 173 fi 174 91 # We suppose that we use the local postgresql installed on the same machine. 175 92 cat >> /var/lib/pgsql/data/pg_hba.conf << EOF 176 93 # Added for FOSSology connection … … 178 95 local all all md5 179 96 # IPv4 local connections: 180 host all all 127.0.0.1/32 md5181 97 host all all 127.0.0.1/32 md5 182 98 # IPv6 local connections: … … 197 113 198 114 # To avoid fossology setup to fail, leave it time to start 199 sleep 2 200 201 # Adjust PHP config (described in detail in section 2.1.5) 202 grep -qw memory_limit PBPHPINI 203 if [ $? -eq 0 ]; then 204 perl -pi -e "s/^[#\s]*memory_limit.*=.*/memory_limit = 702M/" PBPHPINI 205 else 206 echo "memory_limit = 702M" >> PBPHPINI 207 fi 208 grep -qw post_max_size PBPHPINI 209 if [ $? -eq 0 ]; then 210 perl -pi -e "s/^[#\s]*post_max_size.*=.*/post_max_size = 702M/" PBPHPINI 211 else 212 echo "post_max_size = 702M" >> PBPHPINI 213 fi 214 grep -qw upload_max_filesize PBPHPINI 215 if [ $? -eq 0 ]; then 216 perl -pi -e "s/^[#\s]*upload_max_filesize.*=.*/upload_max_filesize = 702M/" PBPHPINI 217 else 218 echo "upload_max_filesize = 702M" >> PBPHPINI 219 fi 220 grep -qw allow_call_time_pass_reference PBPHPINI 221 if [ $? -eq 0 ]; then 222 perl -pi -e "s/^[#\s]*allow_call_time_pass_reference.*=.*/allow_call_time_pass_reference = On/" PBPHPINI 223 else 224 echo "allow_call_time_pass_reference = On" >> PBPHPINI 225 fi 115 sleep 3 226 116 227 117 # Add apache config for fossology (described in detail in section 2.1.6) - done in install … … 230 120 231 121 # Adds user httpd to fossy group 122 #useradd -G fossy httpd 232 123 perl -pi -e 's/^fossy:x:([0-9]+):/fossy:x:$1:httpd/' /etc/group 233 124 234 # httpd 125 # httpd is also assumed to run locally 235 126 LANGUAGE=C /etc/init.d/httpd status 2>&1 | grep -q stop 236 127 if [ $? -eq 0 ]; then -
projects/fossology/pbconf/trunk/pbfilter/centos.pbf
r774 r793 14 14 15 15 # PBDEP is replaced by the list of dependencies 16 filter PBDEP = file postgresql-server smtp -server16 filter PBDEP = file postgresql-server smtpdaemon 17 17 18 18 # PBBUILDDEP is replaced by the list of build dependencies -
projects/fossology/pbconf/trunk/pbfilter/fedora.pbf
r774 r793 14 14 15 15 # PBDEP is replaced by the list of dependencies 16 filter PBDEP = libextractor libextractor-plugins cabextract genisoimage upx sleuthkit file-libs smtp -server16 filter PBDEP = libextractor libextractor-plugins cabextract genisoimage upx sleuthkit file-libs smtpdaemon 17 17 18 18 # PBBUILDDEP is replaced by the list of build dependencies -
projects/fossology/pbconf/trunk/pbfilter/rhel.pbf
r774 r793 14 14 15 15 # PBDEP is replaced by the list of dependencies 16 filter PBDEP = file smtp -server16 filter PBDEP = file smtpdaemon 17 17 18 18 # PBBUILDDEP is replaced by the list of build dependencies -
projects/fossology/pbconf/trunk/pbfilter/rpm.pbf
r774 r793 12 12 13 13 # PBDEP is replaced by the list of dependencies 14 filter PBDEP = smtp -server14 filter PBDEP = smtpdaemon 15 15 16 16 # PBBUILDDEP is replaced by the list of build dependencies
Note:
See TracChangeset
for help on using the changeset viewer.