Changeset 9ba89ba


Ignore:
Timestamp:
Sep 11, 2013 10:10:16 AM (10 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
9599cf7
Parents:
8516ff2 (diff), 651bd28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Conflicts:

src-qt4/life-preserver/LPWatcher.cpp

Files:
67 added
9 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/LPBackend.cpp

    r284b216 rea627be  
    188188  //Copy the given file from the snapshot back into the main dataset 
    189189  // -- filepath: full path to the file in the snapshot directory 
    190    
     190  //qDebug() << " - Revert file:" << filepath; 
     191  filepath.replace("~",QDir::homePath()); 
    191192  //Check that the file path is complete and the file exists 
    192193  if(!QFile::exists(filepath)){ 
     
    223224  } 
    224225  //perform the copy 
     226  qDebug() <<  " - File Reversion:" << filepath << newfilepath; 
    225227  bool ok = QFile::copy(filepath,newfilepath); 
    226228  //return the path to the new file if the copy was successful 
  • src-qt4/life-preserver/LPWatcher.cpp

    r8516ff2 r9ba89ba  
    253253void LPWatcher::checkErrorFile(){ 
    254254  return; 
     255  //Check zpool status and report any errors/processes 
    255256  if(QFile::exists(FILE_ERROR)){ 
    256257    //Read the file to determine the cause of the error 
  • src-sh/Makefile

    r7e0e98c r651bd28  
    3535                sub-pcfirst \ 
    3636                sub-pbi \ 
     37                sub-pbi10 \ 
    3738                sub-deinfo \ 
    3839                sub-meta \ 
     
    262263        cd pbi-manager/ && $(MAKE) -f $(MAKEFILE) install 
    263264 
     265sub-pbi10: pbi-manager10/$(MAKEFILE) FORCE 
     266        cd pbi-manager10/ && $(MAKE) -f $(MAKEFILE) 
     267sub-pbi10-make_default: pbi-manager10/$(MAKEFILE) FORCE 
     268        cd pbi-manager10/ && $(MAKE) -f $(MAKEFILE)  
     269sub-pbi10-make_first: pbi-manager10/$(MAKEFILE) FORCE 
     270        cd pbi-manager10/ && $(MAKE) -f $(MAKEFILE) first 
     271sub-pbi10-all: pbi-manager10/$(MAKEFILE) FORCE 
     272        cd pbi-manager10/ && $(MAKE) -f $(MAKEFILE) all 
     273sub-pbi10-clean: pbi-manager10/$(MAKEFILE) FORCE 
     274        cd pbi-manager10/ && $(MAKE) -f $(MAKEFILE) clean 
     275sub-pbi10-install_subtargets: pbi-manager10/$(MAKEFILE) FORCE 
     276        cd pbi-manager10/ && $(MAKE) -f $(MAKEFILE) install 
     277 
    264278sub-meta: pc-metapkgmanager/$(MAKEFILE) FORCE 
    265279        cd pc-metapkgmanager/ && $(MAKE) -f $(MAKEFILE) 
     
    304318        sub-lpreserver-make_default \ 
    305319        sub-pbi-make_default \ 
     320        sub-pbi10-make_default \ 
    306321        sub-about-make_default \ 
    307322        sub-meta-make_default \ 
     
    326341        sub-lpreserver-make_first \ 
    327342        sub-pbi-make_first \ 
     343        sub-pbi10-make_first \ 
    328344        sub-about-make_first \ 
    329345        sub-meta-make_first \ 
     
    348364        sub-lpreserver-all \ 
    349365        sub-pbi-all \ 
     366        sub-pbi10-all \ 
    350367        sub-about-all \ 
    351368        sub-meta-all \ 
     
    368385 
    369386clean: sub-pbi-clean \ 
     387        sub-pbi10-clean \ 
    370388        sub-libsh-clean \ 
    371389        sub-lpreserver-clean \ 
     
    391409install_subtargets: sub-libsh-install_subtargets \ 
    392410        sub-pbi-install_subtargets \ 
     411        sub-pbi10-install_subtargets \ 
    393412        sub-lpreserver-install_subtargets \ 
    394413        sub-about-install_subtargets \ 
  • src-sh/lpreserver/lpreserver

    r59f367e r7c0c657  
    5252        set - Set lpreserver options 
    5353     status - List datasets, along with last snapshot / replication date  
    54       zpool - Mange a zpool by attaching / detaching disks 
     54      zpool - Manage a zpool by attaching / detaching disks 
    5555__EOF__ 
    5656}; 
  • src-sh/pbi-manager/install.sh

    rd9cad7c r651bd28  
    11#!/bin/sh 
    22# pbi-manager installation script 
     3 
     4# Check if this is for the right version of FreeBSD 
     5verCheck="`grep '^#define __FreeBSD_version' /usr/include/sys/param.h | awk '{print $3}'`" 
     6if [ $verCheck -gt 1000000 ] ; then 
     7  # This version is for FreeBSD <= 10 
     8  exit 0 
     9fi 
    310 
    411DEFAULT="/usr/local" 
  • src-sh/pbi-manager/pbi-manager

    rf9fd15a re858767  
    4141  --checkscript  -- Display any custom install / removal scripts 
    4242  --licagree     -- Agree to LICENSE terms for installation 
     43  --meta         -- Display any custom meta-file supplied with the PBI 
    4344  --no-checksum  -- Skip the checksum verification during installation 
    4445  --no-checksig  -- Ignore signature verification and force install 
     
    9192  -r version   -- Application Version 
    9293  -w url       -- Application Website 
     94  --meta file  -- Include the specified <file> inside the PBI header 
     95                  for display with "pbi_add --meta" 
    9396  --no-hash    -- Disable using shared hash folder for PBI 
    9497  --sign key   -- Sign the PBI with specified openssl key 
     
    123126  -32          -- Build i386 PBI on amd64 host 
    124127  --delbuild   -- Delete existing build dirs if they exist 
     128  --meta file  -- Include the specified meta file in the PBI header 
    125129  --mkdebug    -- Drop to debug shell if port make fails 
    126130  --tmpfs      -- Use TMPFS for port WRKDIRPREFIX 
     
    881885                -i)     PBI_ADD_INFODISPLAY="YES"  
    882886                        ;; 
     887            --meta)     PBI_ADD_METADISPLAY="YES"  
     888                        ;; 
    883889                -l)     PBI_ADD_LICDISPLAY="YES"  
    884890                        ;; 
     
    10591065                -d)     if [ $# -eq 1 ]; then usage_create_pbi; fi 
    10601066                        shift; PORTSDIR="$1" 
     1067                        ;; 
     1068               --meta)  if [ $# -eq 1 ]; then usage_create_pbi; fi 
     1069                        shift; PBI_CREATE_USERMETA="$1" 
     1070                        if [ ! -e "$PBI_CREATE_USERMETA" ] ; then 
     1071                                exit_err "No such file: $PBI_CREATE_USERMETA" 
     1072                        fi 
    10611073                        ;; 
    10621074                -i)     if [ $# -eq 1 ]; then usage_create_pbi; fi 
     
    11621174                        ;; 
    11631175                --tmpfs)        MKTMPFS="YES" 
     1176                        ;; 
     1177               --meta)  if [ $# -eq 1 ]; then usage_make_pbi; fi 
     1178                        shift; PBI_CREATE_USERMETA="$1" 
     1179 
     1180                        # If running the chroot portion, reset the location 
     1181                        if [ "`basename $0`" = "pbi_makeport_chroot" ] ; then 
     1182                                PBI_CREATE_USERMETA="/user-meta" 
     1183                        fi 
     1184 
     1185                        # Check to ensure it exists 
     1186                        if [ ! -e "$PBI_CREATE_USERMETA" ] ; then 
     1187                                exit_err "No such file: $PBI_CREATE_USERMETA" 
     1188                        fi 
    11641189                        ;; 
    11651190                -o)     if [ $# -eq 1 ]; then usage_make_pbi; fi 
     
    13871412        PBI_ADD_GUIDISPLAY="NO" 
    13881413        PBI_ADD_INFODISPLAY="NO" 
     1414        PBI_ADD_METADISPLAY="NO" 
    13891415        PBI_ADD_LICDISPLAY="NO" 
    13901416        PBI_APPDESK_DIR=".${MOD_XDGDESK_DIR}" 
     
    14221448        PBI_LICAGREE="NO" 
    14231449        PBI_LICENSEFILE="LICENSE" 
     1450        PBI_USERMETAFILE="metafile" 
    14241451        PBI_PATCHVERSION="" 
    14251452        PBI_PATCHTARGET="" 
     
    24152442        check_pbi_scripts_display 
    24162443        check_pbi_license_display 
    2417         if [ "$PBI_ADD_GUIDISPLAY" = "YES" -o "$PBI_ADD_INFODISPLAY" = "YES" -o "$PBI_CHECKSCRIPTS" = "YES" -o "${PBI_ADD_LICDISPLAY}" = "YES" ]  
     2444        if [ "$PBI_ADD_GUIDISPLAY" = "YES" -o "$PBI_ADD_INFODISPLAY" = "YES" -o "$PBI_CHECKSCRIPTS" = "YES" -o "${PBI_ADD_LICDISPLAY}" = "YES" -o "${PBI_ADD_METADISPLAY}" = "YES" ]  
    24182445        then  
    24192446                exit_trap 
     
    26752702        check_pbi_scripts_display 
    26762703        check_pbi_license_display 
    2677         if [ "$PBI_ADD_GUIDISPLAY" = "YES" -o "$PBI_ADD_INFODISPLAY" = "YES" -o "$PBI_CHECKSCRIPTS" = "YES" -o "${PBI_ADD_LICDISPLAY}" = "YES" ]  
     2704        check_pbi_meta_display 
     2705        if [ "$PBI_ADD_GUIDISPLAY" = "YES" -o "$PBI_ADD_INFODISPLAY" = "YES" -o "$PBI_CHECKSCRIPTS" = "YES" -o "${PBI_ADD_LICDISPLAY}" = "YES" -o "${PBI_ADD_METADISPLAY}" = "YES" ]  
    26782706        then  
    26792707                clean_remote_dl 
     
    27282756        fi 
    27292757        delete_header_tmp 
     2758} 
     2759 
     2760# See if we need to display pbi meta file 
     2761check_pbi_meta_display() { 
     2762        if [ "$PBI_ADD_METADISPLAY" != "YES" ] ; then return 0 ; fi 
     2763        open_header_tmp 
     2764         
     2765        if [ -f "${PBI_HEADER_TMPDIR}/${PBI_USERMETAFILE}" ] ; then  
     2766                cat "${PBI_HEADER_TMPDIR}/${PBI_USERMETAFILE}"   
     2767        else 
     2768                echo "`basename $0`: No user metafile included with this PBI" 
     2769        fi 
     2770        delete_header_tmp 
    27302771} 
    27312772 
     
    41664207        fi 
    41674208 
     4209        # Do we have a conf-supplied meta-file to copy? 
     4210        if [ -e "${PBI_CONFDIR}/${PBI_USERMETAFILE}" ] ; then 
     4211                cp "${PBI_CONFDIR}/${PBI_USERMETAFILE}" "${PBI_HEADERDIR}/${PBI_USERMETAFILE}" 
     4212        fi 
     4213        # Do we have a user-supplied meta-file to copy? 
     4214        if [ -n "$PBI_CREATE_USERMETA" ] ; then 
     4215                cp "$PBI_CREATE_USERMETA" "${PBI_HEADERDIR}/${PBI_USERMETAFILE}" 
     4216        fi 
     4217 
    41684218        # Custom install / remove scripts 
    41694219        if [ -e "${PBI_CONFDIR}/${PBI_CONF_SCRIPTSDIR}/${MOD_PREINS}" ] ; then 
     
    69266976                        cp ${PBI_POSTMAKE_SCRIPT} ${PBI_CHROOTDIR}/post-build.sh 
    69276977                fi 
     6978        fi 
     6979 
     6980        # Do we have a user-supplied meta-file to include in the PBI? 
     6981        if [ -n "${PBI_CREATE_USERMETA}" ] ; then 
     6982           cp "$PBI_CREATE_USERMETA" ${PBI_CHROOTDIR}/user-meta 
    69286983        fi 
    69296984 
  • src-qt4/life-preserver/LPTray.cpp

    r29fe4e9 r8516ff2  
    44LPTray::LPTray() : QSystemTrayIcon(){ 
    55  initPhase = true; //flag that we are in the startup process 
    6   //Start up the log file watcher 
    7   QString logfile = "/var/log/lpreserver/lpreserver.log"; 
     6  //Start up the log file watcher and connect the signals/slots 
     7  watcher = new LPWatcher(); 
     8        connect(watcher,SIGNAL(MessageAvailable(QString)),this,SLOT(watcherMessage(QString)) ); 
     9         
     10  /*QString logfile = "/var/log/lpreserver/lpreserver.log"; 
    811  watcher = new QFileSystemWatcher(); 
    912        if(!QFile::exists(logfile)){  
     
    1619  LFStream = new QTextStream(logFile); 
    1720        connect(watcher, SIGNAL(fileChanged(QString)),this,SLOT(slotNewLogMessage(QString)) ); //now connect the signal/slot 
     21        */ 
    1822  //Setup the context menu 
    1923  menu = new QMenu; 
     
    2226  this->setContextMenu(menu); 
    2327  //Setup the animated icon timer 
     28  /* 
    2429  timer = new QTimer(); 
    2530        timer->setInterval(100); 
    2631        connect(timer, SIGNAL(timeout()), this, SLOT(displayWorkingIcon()) ); 
     32  */ 
    2733  //Setup initial icon for the tray 
    2834  this->setIcon( QIcon(":/images/tray-icon-idle.png") ); 
     
    3238  connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(slotTrayClicked(QSystemTrayIcon::ActivationReason)) ); 
    3339  //Make sure we check the latest line in the logfile 
    34   QTimer::singleShot(1000, this,SLOT(firstCheck())); 
     40  //QTimer::singleShot(1000, this,SLOT(firstCheck())); 
     41  //Start up the watcher 
     42  watcher->start(); 
    3543} 
    3644 
    3745LPTray::~LPTray(){ 
    38   if(statFile != 0){ statFile->close(); } 
    39   logFile->close(); 
    40   delete statFile; 
    41   delete logFile; 
     46  //if(statFile != 0){ statFile->close(); } 
     47  //logFile->close(); 
     48  //delete statFile; 
     49  //delete logFile; 
     50  watcher->stop(); 
    4251  delete watcher; 
    43   delete menu; 
    44   delete timer; 
     52  //delete menu; 
     53  //delete timer; 
    4554} 
    4655 
     
    4857//  PRIVATE FUNCTIONS 
    4958// =============== 
     59/* 
    5060void LPTray::parseLogMessage(QString log, bool quiet){ 
    5161  //Divide up the log into it's sections 
     
    188198  return num; 
    189199} 
     200*/ 
    190201 
    191202// =============== 
    192203//     PRIVATE SLOTS 
    193204// =============== 
     205void LPTray::watcherMessage(QString type){ 
     206  qDebug() << "New Watcher Message:" << type; 
     207} 
     208/* 
    194209void LPTray::firstCheck(){ 
    195210  slotNewLogMessage("/var/log/lpreserver/lpreserver.log"); 
     
    218233  } 
    219234} 
    220  
     235*/ 
    221236void LPTray::slotTrayClicked(QSystemTrayIcon::ActivationReason reason){ 
    222237  if(reason == QSystemTrayIcon::Trigger){  
     
    248263} 
    249264 
    250 void LPTray::displayWorkingIcon(){ 
     265/*void LPTray::displayWorkingIcon(){ 
    251266  QString ico = ":/images/tray-icon-active"+QString::number(wNum)+".png"; 
    252267  this->setIcon(QIcon(ico)); 
    253268  if(wNum == 16){ wNum = 1; } //go back to the beginning of the loop 
    254269  else{ wNum++; } 
    255 } 
     270}*/ 
  • src-qt4/life-preserver/LPTray.h

    r559e01f r8516ff2  
    2121 
    2222private: 
    23         QFileSystemWatcher *watcher; 
     23        //QFileSystemWatcher *watcher; 
     24        LPWatcher *watcher; 
    2425        QMenu *menu; 
    25         QTimer *timer; 
     26        //QTimer *timer; 
    2627        mainUI *GUI; 
    27         QString sFile; //location of the replication status file 
    28         QFile *logFile, *statFile; 
    29         QTextStream *LFStream, *SFStream; 
    30         QString repTotK, lastSize; 
    31         int wNum; //internal tracking of which frame of the icon animation we are on 
     28        //QString sFile; //location of the replication status file 
     29        //QFile *logFile, *statFile; 
     30        //QTextStream *LFStream, *SFStream; 
     31        //QString repTotK, lastSize; 
     32        //int wNum; //internal tracking of which frame of the icon animation we are on 
    3233        bool initPhase; 
    3334 
    34         void parseLogMessage(QString, bool quiet = false); 
    35         void parseStatusMessage(QString); 
    36         void setIdleToolTip(); 
    37         void startWorkingIcon(); 
    38         void stopWorkingIcon(); 
    39         double displayToDoubleK(QString); 
     35        //void parseLogMessage(QString, bool quiet = false); 
     36        //void parseStatusMessage(QString); 
     37        //void setIdleToolTip(); 
     38        //void startWorkingIcon(); 
     39        //void stopWorkingIcon(); 
     40        //double displayToDoubleK(QString); 
    4041 
    4142private slots: 
    42         void firstCheck(); 
    43         void slotNewLogMessage(QString); 
     43        void watcherMessage(QString); 
     44        //void firstCheck(); 
     45        //void slotNewLogMessage(QString); 
    4446        void slotTrayClicked(QSystemTrayIcon::ActivationReason); 
    4547        void slotClose(); 
    4648        void slotSingleInstance(); 
    4749        void startGUI(); 
    48         void displayWorkingIcon(); 
     50        //void displayWorkingIcon(); 
    4951}; 
    5052 
  • src-qt4/life-preserver/LPWatcher.h

    r559e01f r8516ff2  
    5252 
    5353signals: 
    54         void CriticalMessageAvailable(); 
    55         void ProcessUpdateAvailable(); 
    56         void NotificationMessageAvailable(); 
     54        void MessageAvailable(QString type); 
    5755}; 
    5856 
Note: See TracChangeset for help on using the changeset viewer.