mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 01:09:24 -04:00
- Cleanup patches (rebase from previous version)
- Fix several warnings that were caught by Clang - Strip installed programs; polish pkg-message text
This commit is contained in:
parent
d8e1d73265
commit
b07c59b04d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=377378
8 changed files with 42 additions and 35 deletions
|
@ -1,6 +1,6 @@
|
||||||
--- config.h.orig Wed Jun 29 19:53:18 2005
|
--- config.h.orig Wed Jun 29 19:53:18 2005
|
||||||
+++ config.h Sun Jun 17 20:05:51 2007
|
+++ config.h Sun Jun 17 20:05:51 2007
|
||||||
@@ -395,4 +395,6 @@
|
@@ -389,4 +389,6 @@
|
||||||
*/
|
*/
|
||||||
#define MIN_WOULDBLOCK_DELAY 100L
|
#define MIN_WOULDBLOCK_DELAY 100L
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
installthis:
|
installthis:
|
||||||
-mkdir -p $(DESTDIR)$(BINDIR)
|
-mkdir -p $(DESTDIR)$(BINDIR)
|
||||||
- $(INSTALL) -m 555 -o bin -g bin thttpd $(DESTDIR)$(BINDIR)
|
- $(INSTALL) -m 555 -o bin -g bin thttpd $(DESTDIR)$(BINDIR)
|
||||||
+ $(INSTALL) -m 555 thttpd $(DESTDIR)$(BINDIR)
|
+ $(INSTALL) -s -m 555 thttpd $(DESTDIR)$(BINDIR)
|
||||||
|
|
||||||
install-man:
|
install-man:
|
||||||
-mkdir -p $(DESTDIR)$(MANDIR)/man8
|
-mkdir -p $(DESTDIR)$(MANDIR)/man8
|
||||||
|
|
|
@ -26,15 +26,15 @@
|
||||||
- cp phf $(CGIBINDIR)/phf
|
- cp phf $(CGIBINDIR)/phf
|
||||||
+ -mkdir -p $(DESTDIR)$(CGIBINDIR)
|
+ -mkdir -p $(DESTDIR)$(CGIBINDIR)
|
||||||
+ rm -f $(DESTDIR)$(CGIBINDIR)/redirect
|
+ rm -f $(DESTDIR)$(CGIBINDIR)/redirect
|
||||||
+ cp redirect $(DESTDIR)$(CGIBINDIR)/redirect
|
+ $(INSTALL) -s -m 555 redirect $(DESTDIR)$(CGIBINDIR)/redirect
|
||||||
+ rm -f $(DESTDIR)$(MANDIR)/man8/redirect.8
|
+ rm -f $(DESTDIR)$(MANDIR)/man8/redirect.8
|
||||||
+ cp redirect.8 $(DESTDIR)$(MANDIR)/man8/redirect.8
|
+ $(INSTALL) -m 444 redirect.8 $(DESTDIR)$(MANDIR)/man8/redirect.8
|
||||||
+ rm -f $(DESTDIR)$(CGIBINDIR)/ssi
|
+ rm -f $(DESTDIR)$(CGIBINDIR)/ssi
|
||||||
+ cp ssi $(DESTDIR)$(CGIBINDIR)/ssi
|
+ $(INSTALL) -s -m 555 ssi $(DESTDIR)$(CGIBINDIR)/ssi
|
||||||
+ rm -f $(DESTDIR)$(MANDIR)/man8/ssi.8
|
+ rm -f $(DESTDIR)$(MANDIR)/man8/ssi.8
|
||||||
+ cp ssi.8 $(DESTDIR)$(MANDIR)/man8/ssi.8
|
+ $(INSTALL) -m 444 ssi.8 $(DESTDIR)$(MANDIR)/man8/ssi.8
|
||||||
+ rm -f $(DESTDIR)$(CGIBINDIR)/phf
|
+ rm -f $(DESTDIR)$(CGIBINDIR)/phf
|
||||||
+ cp phf $(DESTDIR)$(CGIBINDIR)/phf
|
+ $(INSTALL) -s -m 555 phf $(DESTDIR)$(CGIBINDIR)/phf
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(CLEANFILES)
|
rm -f $(CLEANFILES)
|
||||||
|
|
|
@ -26,15 +26,15 @@
|
||||||
- rm -f $(MANDIR)/man8/syslogtocern.8
|
- rm -f $(MANDIR)/man8/syslogtocern.8
|
||||||
- cp syslogtocern.8 $(MANDIR)/man8/syslogtocern.8
|
- cp syslogtocern.8 $(MANDIR)/man8/syslogtocern.8
|
||||||
+ rm -f $(DESTDIR)$(BINDIR)/makeweb $(DESTDIR)$(BINDIR)/thtpasswd $(DESTDIR)$(BINDIR)/syslogtocern
|
+ rm -f $(DESTDIR)$(BINDIR)/makeweb $(DESTDIR)$(BINDIR)/thtpasswd $(DESTDIR)$(BINDIR)/syslogtocern
|
||||||
+ cp makeweb $(DESTDIR)$(BINDIR)/makeweb
|
+ $(INSTALL) -s -m 555 makeweb $(DESTDIR)$(BINDIR)/makeweb
|
||||||
+ cp htpasswd $(DESTDIR)$(BINDIR)/thtpasswd
|
+ $(INSTALL) -s -m 555 htpasswd $(DESTDIR)$(BINDIR)/thtpasswd
|
||||||
+ cp syslogtocern $(DESTDIR)$(BINDIR)/syslogtocern
|
+ $(INSTALL) -m 555 syslogtocern $(DESTDIR)$(BINDIR)/syslogtocern
|
||||||
+ rm -f $(DESTDIR)$(MANDIR)/man1/makeweb.1
|
+ rm -f $(DESTDIR)$(MANDIR)/man1/makeweb.1
|
||||||
+ cp makeweb.1 $(DESTDIR)$(MANDIR)/man1/makeweb.1
|
+ $(INSTALL) -m 444 makeweb.1 $(DESTDIR)$(MANDIR)/man1/makeweb.1
|
||||||
+ rm -f $(DESTDIR)$(MANDIR)/man1/thtpasswd.1
|
+ rm -f $(DESTDIR)$(MANDIR)/man1/thtpasswd.1
|
||||||
+ cp htpasswd.1 $(DESTDIR)$(MANDIR)/man1/thtpasswd.1
|
+ $(INSTALL) -m 444 htpasswd.1 $(DESTDIR)$(MANDIR)/man1/thtpasswd.1
|
||||||
+ rm -f $(DESTDIR)$(MANDIR)/man8/syslogtocern.8
|
+ rm -f $(DESTDIR)$(MANDIR)/man8/syslogtocern.8
|
||||||
+ cp syslogtocern.8 $(DESTDIR)$(MANDIR)/man8/syslogtocern.8
|
+ $(INSTALL) -m 444 syslogtocern.8 $(DESTDIR)$(MANDIR)/man8/syslogtocern.8
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(CLEANFILES)
|
rm -f $(CLEANFILES)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- extras/htpasswd.c.orig 2001-12-19 00:08:08 UTC
|
--- extras/htpasswd.c.orig 2001-12-19 00:08:08 UTC
|
||||||
+++ extras/htpasswd.c
|
+++ extras/htpasswd.c
|
||||||
@@ -21,7 +21,12 @@ extern char *crypt(const char *key, cons
|
@@ -19,7 +19,12 @@
|
||||||
#define LF 10
|
#define LF 10
|
||||||
#define CR 13
|
#define CR 13
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
int tfd;
|
int tfd;
|
||||||
char temp_template[] = "/tmp/htp.XXXXXX";
|
char temp_template[] = "/tmp/htp.XXXXXX";
|
||||||
@@ -137,8 +142,9 @@ add_password( char* user, FILE* f )
|
@@ -135,8 +140,9 @@ add_password( char* user, FILE* f )
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usage(void) {
|
static void usage(void) {
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,51 +157,131 @@ void interrupted(int signo) {
|
@@ -149,51 +155,128 @@ void interrupted(int signo) {
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
FILE *tfp,*f;
|
FILE *tfp,*f;
|
||||||
char user[MAX_STRING_LEN];
|
char user[MAX_STRING_LEN];
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
+ char line[MAX_LINE_LEN];
|
+ char line[MAX_LINE_LEN];
|
||||||
+ char l[MAX_LINE_LEN];
|
+ char l[MAX_LINE_LEN];
|
||||||
char w[MAX_STRING_LEN];
|
char w[MAX_STRING_LEN];
|
||||||
char command[MAX_STRING_LEN];
|
- char command[MAX_STRING_LEN];
|
||||||
- int found;
|
- int found;
|
||||||
+ int found,u;
|
+ int found,u;
|
||||||
|
|
||||||
|
@ -80,8 +80,7 @@
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+ if (strlen(argv[3]) > (sizeof(user) - 1)) {
|
+ if (strlen(argv[3]) > (sizeof(user) - 1)) {
|
||||||
+ fprintf(stderr, "%s: username is too long\n", argv[0],
|
+ fprintf(stderr, "%s: username is too long\n", argv[0]);
|
||||||
+ sizeof(user) - 1);
|
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+ if ((strchr(argv[3], ':')) != NULL) {
|
+ if ((strchr(argv[3], ':')) != NULL) {
|
||||||
|
@ -109,8 +108,7 @@
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+ if (strlen(argv[2]) > (sizeof(user) - 1)) {
|
+ if (strlen(argv[2]) > (sizeof(user) - 1)) {
|
||||||
+ fprintf(stderr, "%s: username is too long\n", argv[0],
|
+ fprintf(stderr, "%s: username is too long\n", argv[0]);
|
||||||
+ sizeof(user) - 1);
|
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+ if ((strchr(argv[2], ':')) != NULL) {
|
+ if ((strchr(argv[2], ':')) != NULL) {
|
||||||
|
@ -168,7 +166,7 @@
|
||||||
if(strcmp(user,w)) {
|
if(strcmp(user,w)) {
|
||||||
putline(tfp,line);
|
putline(tfp,line);
|
||||||
continue;
|
continue;
|
||||||
@@ -210,10 +296,28 @@ int main(int argc, char *argv[]) {
|
@@ -208,10 +291,28 @@ int main(int argc, char *argv[]) {
|
||||||
printf("Adding user %s\n",user);
|
printf("Adding user %s\n",user);
|
||||||
add_password(user,tfp);
|
add_password(user,tfp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--- mmc.c.orig Tue Oct 22 09:42:01 2002
|
--- mmc.c.orig Tue Oct 22 09:42:01 2002
|
||||||
+++ mmc.c Fri Nov 14 12:26:39 2003
|
+++ mmc.c Fri Nov 14 12:26:39 2003
|
||||||
@@ -74,6 +74,9 @@
|
@@ -83,6 +83,9 @@
|
||||||
time_t ctime;
|
time_t ct;
|
||||||
int refcount;
|
int refcount;
|
||||||
time_t reftime;
|
time_t reftime;
|
||||||
+#ifdef USE_SENDFILE
|
+#ifdef USE_SENDFILE
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
void* addr;
|
void* addr;
|
||||||
unsigned int hash;
|
unsigned int hash;
|
||||||
int hash_idx;
|
int hash_idx;
|
||||||
@@ -140,7 +143,11 @@
|
@@ -149,7 +152,11 @@
|
||||||
/* Yep. Just return the existing map */
|
/* Yep. Just return the existing map */
|
||||||
++m->refcount;
|
++m->refcount;
|
||||||
m->reftime = now;
|
m->reftime = now;
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open the file. */
|
/* Open the file. */
|
||||||
@@ -186,7 +193,9 @@
|
@@ -195,7 +202,9 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t size_size = (size_t) m->size; /* loses on files >2GB */
|
size_t size_size = (size_t) m->size; /* loses on files >2GB */
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
/* Map the file into memory. */
|
/* Map the file into memory. */
|
||||||
m->addr = mmap( 0, size_size, PROT_READ, MAP_PRIVATE, fd, 0 );
|
m->addr = mmap( 0, size_size, PROT_READ, MAP_PRIVATE, fd, 0 );
|
||||||
if ( m->addr == (void*) -1 && errno == ENOMEM )
|
if ( m->addr == (void*) -1 && errno == ENOMEM )
|
||||||
@@ -234,8 +243,9 @@
|
@@ -243,8 +252,9 @@
|
||||||
}
|
}
|
||||||
#endif /* HAVE_MMAP */
|
#endif /* HAVE_MMAP */
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
/* Put the Map into the hash table. */
|
/* Put the Map into the hash table. */
|
||||||
if ( add_hash( m ) < 0 )
|
if ( add_hash( m ) < 0 )
|
||||||
{
|
{
|
||||||
@@ -253,8 +263,12 @@
|
@@ -262,8 +272,12 @@
|
||||||
/* Update the total byte count. */
|
/* Update the total byte count. */
|
||||||
mapped_bytes += m->size;
|
mapped_bytes += m->size;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -267,14 +281,18 @@
|
@@ -276,14 +290,18 @@
|
||||||
if ( sbP != (struct stat*) 0 )
|
if ( sbP != (struct stat*) 0 )
|
||||||
{
|
{
|
||||||
m = find_hash( sbP->st_ino, sbP->st_dev, sbP->st_size, sbP->st_ctime );
|
m = find_hash( sbP->st_ino, sbP->st_dev, sbP->st_size, sbP->st_ctime );
|
||||||
|
@ -76,14 +76,23 @@
|
||||||
if ( m == (Map*) 0 )
|
if ( m == (Map*) 0 )
|
||||||
syslog( LOG_ERR, "mmc_unmap failed to find entry!" );
|
syslog( LOG_ERR, "mmc_unmap failed to find entry!" );
|
||||||
else if ( m->refcount <= 0 )
|
else if ( m->refcount <= 0 )
|
||||||
@@ -363,7 +381,9 @@
|
@@ -372,7 +390,9 @@
|
||||||
m = *mm;
|
m = *mm;
|
||||||
if ( m->size != 0 )
|
if ( m->size != 0 )
|
||||||
{
|
{
|
||||||
-#ifdef HAVE_MMAP
|
-#ifdef HAVE_MMAP
|
||||||
+#ifdef USE_SENDFILE
|
+#ifdef USE_SENDFILE
|
||||||
+ close(m->fd);
|
+ close(m->fd);
|
||||||
+#elif defined(HAVE_MMAP)
|
+#elif defined(HAVE_MMAP)
|
||||||
if ( munmap( m->addr, m->size ) < 0 )
|
if ( munmap( m->addr, m->size ) < 0 )
|
||||||
syslog( LOG_ERR, "munmap - %m" );
|
syslog( LOG_ERR, "munmap - %m" );
|
||||||
#else /* HAVE_MMAP */
|
#else /* HAVE_MMAP */
|
||||||
|
@@ -523,7 +543,7 @@
|
||||||
|
mmc_logstats( long secs )
|
||||||
|
{
|
||||||
|
syslog(
|
||||||
|
- LOG_INFO, " map cache - %d allocated, %d active (%lld bytes), %d free; hash size: %d; expire age: %ld",
|
||||||
|
+ LOG_INFO, " map cache - %d allocated, %d active (%lld bytes), %d free; hash size: %d; expire age: %d",
|
||||||
|
alloc_count, map_count, (long long) mapped_bytes, free_count, hash_size,
|
||||||
|
expire_age );
|
||||||
|
if ( map_count + free_count != alloc_count )
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
+ sz = sbytes > 0 ? sbytes : -1;
|
+ sz = sbytes > 0 ? sbytes : -1;
|
||||||
+ else if (sz == 0)
|
+ else if (sz == 0)
|
||||||
+ sz = sbytes;
|
+ sz = sbytes;
|
||||||
+#else
|
+#else
|
||||||
sz = write(
|
sz = write(
|
||||||
hc->conn_fd, &(hc->file_address[c->next_byte_index]),
|
hc->conn_fd, &(hc->file_address[c->next_byte_index]),
|
||||||
MIN( c->end_byte_index - c->next_byte_index, max_bytes ) );
|
MIN( c->end_byte_index - c->next_byte_index, max_bytes ) );
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
+ sz = sbytes > 0 ? sbytes : -1;
|
+ sz = sbytes > 0 ? sbytes : -1;
|
||||||
+ else if (sz == 0)
|
+ else if (sz == 0)
|
||||||
+ sz = sbytes;
|
+ sz = sbytes;
|
||||||
+#else
|
+#else
|
||||||
/* Yes. We'll combine headers and file into a single writev(),
|
/* Yes. We'll combine headers and file into a single writev(),
|
||||||
** hoping that this generates a single packet.
|
** hoping that this generates a single packet.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
If you want users to be able to create their own Web
|
If you want users to be able to create their own Web
|
||||||
subdirectories off of the main web directory, you need to:
|
subdirectories off of the main web directory, you need to:
|
||||||
|
|
||||||
1. Add a group for www admins (e.g., "%%WWWGRP%%")
|
1. Add a group for www admins (or use "%%WWWGRP%%")
|
||||||
2. chgrp thatgroup %%PREFIX%%/bin/makeweb %%WWWDIR%%
|
2. chgrp thatgroup %%PREFIX%%/bin/makeweb %%WWWDIR%%
|
||||||
3. chmod 2755 %%PREFIX%%/bin/makeweb
|
3. chmod g+sx %%PREFIX%%/bin/makeweb
|
||||||
4. Tell users about makeweb(1)
|
4. Tell users about makeweb(1)
|
||||||
|
|
||||||
See http://www.acme.com/software/thttpd/notes.html for more
|
See http://www.acme.com/software/thttpd/notes.html for more
|
||||||
|
|
Loading…
Add table
Reference in a new issue