* create format strings different for solaris
authorWilfried Göesgens <willi@citadel.org>
Mon, 5 Mar 2007 23:44:03 +0000 (23:44 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 5 Mar 2007 23:44:03 +0000 (23:44 +0000)
* some solaris build scripts

citadel/acconfig.h
citadel/buildpackages
citadel/config.c
citadel/configure.ac
citadel/debian/changelog
citadel/server_main.c
citadel/sysdep.c
citadel/tools.c
citadel/user_ops.c

index 63401969f5e3140b97f0f7808109c72db1f60b52..d654a01d71285473ce019a97b2ddc452e5eadea7 100644 (file)
 
 #undef EGD_POOL 
 
+/* check for the solaris style getpwuid_r */
+#undef SOLARIS_GETPWUID
 
-/* check for the bsd style getpwuid_r */
-#undef BSD_GETPWUID
+/* we want our format strings to be acurate. */
+#undef F_UID_T
+
+/* we want our format strings to be acurate. */
+#undef F_PID_T
+
+/* we want our format strings to be acurate. */
+#undef F_XPID_T
index 40cbf5ad5cbd58bc49b18e48959f5c574dda6bfa..f1ae0097f41f02451070ea747da53ca6b9fa12b0 100755 (executable)
@@ -39,9 +39,6 @@ fi
 
 case $1 in
     debian)
-
-#dpkg-source: warning: source directory `./citadel' is not <sourcepackage>-<upstreamversion> `citadel-6.61'
-       
        if grep -q "($CITADEL_VERSION" debian/changelog; then
            echo rebuilding package.
        else
@@ -61,6 +58,43 @@ case $1 in
        else
            fakeroot dpkg-buildpackage
        fi
+       ;;
+    csw)
+       if !test -d ~/pkgs/; then
+           mkdir ~/pkgs
+       fi
+       echo "
+PKG=CSWcitadel
+NAME=citadel - The groupware server for Web 2.0
+VERSION=${PACKAGE_VERSION}
+CATEGORY=application
+VENDOR=http://www.citadel.org/  packaged for CSW by Wilfried Goesgens
+HOTLINE=https://uncensored.citadel.org/ Room citadel support
+EMAIL=citadel@outgesourced.org
+" >~/pkgs/citadel
+       export LDFLAGS='-L/opt/csw/lib -L /usr/local/lib'
+       export CFLAGS='-I/opt/csw/include -I/usr/local/include  -DDISABLE_CURSES'
+       ./configure \
+           --with-db=/opt/csw/bdb44 \
+           --with-ical=/usr/local/ \
+           --without-curses \
+           --with-prefix=/opt/csw/ \
+           --with-datadir=/opt/csw/var/lib/citadel \
+           --with-sysconfdir=/opt/csw/etc/citadel \
+           --with-ssldir=/opt/csw/etc/ssl/citadel/ \
+           --with-spooldir=/opt/csw/var/spool/citadel \
+           --with-rundir=/opt/csw/var/run/citadel \
+           --with-docdir=/opt/csw/share/doc/citadel-doc/ \
+           --with-pam \
+           --with-zlib \
+           --with-ldap \
+           --with-libsieve
+           
+       gmake citserver aidepost msgform citmail userlist sendcommand base64 whobbs citadel
+       gmake DESTDIR=$ACTUAL_DIR/cswstage install-new
+       
+
+
        ;;
     sourcedist)
        cd ..; tar --exclude .svn -cvzf citadel-$CITADEL_VERSION.tgz citadel-$CITADEL_VERSION/
index b466c3acae182f4f7660bdf2320a946389cd9640..35a25b8cba7867feec00d0b518b2847f2bef7bcf 100644 (file)
@@ -55,7 +55,8 @@ void get_config(void) {
        }
 #ifndef __CYGWIN__
        if (st.st_uid != CTDLUID) {
-               fprintf(stderr, "%s must be owned by uid=%ld but %ld owns it!\n", file_citadel_config, CTDLUID, st.st_uid);
+               fprintf(stderr, "%s must be owned by uid="F_UID_T" but "F_UID_T" owns it!\n", 
+                       file_citadel_config, CTDLUID, st.st_uid);
                exit(CTDLEXIT_CONFIG);
        }
        int desired_mode = (S_IFREG | S_IRUSR | S_IWUSR) ;
index 2b5089e39d92d9bdf39a05029ffcacc9eff9cf07..636dd7269c40a6c12487f631ff8db3bdcb5c4cf6 100644 (file)
@@ -621,7 +621,14 @@ AC_CACHE_CHECK([for call semantics from getpwuid_r], ac_cv_call_getpwuid_r,
 ],
 ac_cv_call_getpwuid_r=yes, ac_cv_call_getpwuid_r=no)])
 if test $ac_cv_call_getpwuid_r = no; then
-       AC_DEFINE(BSD_GETPWUID)
+       AC_DEFINE(SOLARIS_GETPWUID)
+       AC_DEFINE(F_UID_T, "%ld")
+       AC_DEFINE(F_PID_T, "%ld")
+       AC_DEFINE(F_XPID_T, "%lx")
+else
+       AC_DEFINE(F_UID_T, "%d")
+       AC_DEFINE(F_PID_T, "%d")
+       AC_DEFINE(F_XPID_T, "%x")
 fi
 
 
index f0a2d7f827d83b1642983c77b174f1d9f9baf968..f6b9c8c487314842a6b68c34da6b22213c776b31 100644 (file)
@@ -1,4 +1,10 @@
-citadel (7.05-1) stable; urgency=low
+citadel (7.05-9) stable; urgency=high
+
+  * maintainance release, ical upgrade
+
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Thu, 1 Mar 2007 21:09:00 +0100
+
+citadel (7.05-8) stable; urgency=low
 
   * Citadel 7.05 release
 
index f5ee8dc7d9e12d1ebbc05cf4c60df54bb3a866df..d831ec0f5dc14cfcd5628e6abcc67d5a5613e316 100644 (file)
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
        /* on some dists rundir gets purged on startup. so we need to recreate it. */
 
        if (stat(ctdl_run_dir, &filestats)==-1){
-#ifdef BSD_GETPWUID
+#ifdef SOLARIS_GETPWUID
                pwp = getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf));
 #else
                getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf), &pwp);
@@ -241,7 +241,7 @@ int main(int argc, char **argv)
         * corresponding group ids
         */
        if (drop_root_perms) {
-#ifdef BSD_GETPWUID
+#ifdef SOLARIS_GETPWUID
                pwp = getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf));
 #else
                getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf), &pwp);
index d463421b47c122f20d42d60957ff8c1f2aecb920..b5b37a7ddf20ef214b31827a472df47e9fa74a38 100644 (file)
@@ -837,7 +837,7 @@ void start_daemon(int unused) {
                else {
                        fp = fopen(file_pid_file, "w");
                        if (fp != NULL) {
-                               fprintf(fp, "%ld\n", child);
+                               fprintf(fp, ""F_PID_T"\n", child);
                                fclose(fp);
                        }
                        waitpid(current_child, &status, 0);
index 4927e18d4d72a1c87d089f22b385f39034771c4b..0f85643ee1ad003b2db388e7bf0bc17af6103136 100644 (file)
@@ -593,7 +593,7 @@ char *strcpy(char *dest, const char *src) {
 void generate_uuid(char *buf) {
        static int seq = 0;
 
-       sprintf(buf, "%lx-%x-%x",
+       sprintf(buf, "%lx-"F_XPID_T"-%x",
                time(NULL),
                getpid(),
                (seq++)
@@ -670,7 +670,7 @@ void CtdlMakeTempFileName(char *name, int len) {
        int i = 0;
 
        while (i++, i < 100) {
-               snprintf(name, len, "/tmp/ctdl.%04x.%04x",
+               snprintf(name, len, "/tmp/ctdl."F_XPID_T".%04x",
                        getpid(),
                        rand()
                );
index db277c5ae4289bea9a0f66c751bfaebfb933a545..aa1330f1030476419db4c95cc054e6d7b8774bfb 100644 (file)
@@ -367,7 +367,7 @@ int CtdlLoginExistingUser(char *trythisname)
                char pwdbuffer[256];
        
                lprintf(CTDL_DEBUG, "asking host about <%s>\n", username);
-#ifdef BSD_GETPWUID
+#ifdef SOLARIS_GETPWUID
                tempPwdPtr = getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer);
 #else
                getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer, &tempPwdPtr);
@@ -838,7 +838,7 @@ int create_user(char *newusername, int become_user)
                struct passwd *tempPwdPtr;
                char pwdbuffer[256];
        
-#ifdef BSD_GETPWUID
+#ifdef SOLARIS_GETPWUID
                tempPwdPtr = getpwnam_r(username, &pd, pwdbuffer, sizeof(pwdbuffer));
 #else
                getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer, &tempPwdPtr);