[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

upgrade 1.2.21 -> 1.3.0 svn revision 3827 == Yes!




Yes, it does make sense. I was missing a couple of steps and now I'm where I can test.

I have attached a script which is crude but which can upgrade my 1.2 to 1.3 in just a few minutes. It might help with either documentation or install scripts. I put a couple of things in a separate directory which bring in my local mods (for example: /usr/sbin/sendmail instead or /usr/bin/sendmail in ledgersmb.conf) that sort of thing. sed would also work but this was easier for the quick and dirty.

What I am doing, in summary, is svn update to bring in latest revision; diffing select files to see if there are any changes I need to cope with in my local mods; cloning and upgrading the 1.2 database. It works and I am ready to begin running 1.3 in parallel upgrading as often as I wish.

Thanks to ehu and Chris for the help. You guys saved me weeks of researching and trying stuff.

Louis

off to do the happy dance...




On Sat, 8 Oct 2011, Chris Travers wrote:

Brief explanation:

LedgerSMB has gone from a hide-the-menu-item form of security to
role-based database security.  The menu items are now removed or not
based upon the database roles one is granted, and these roles also
control permissions to underlying tables.  If you don't have adequate
permissions, you won't be able to see menu items or do much of
anything else.  If the permissions are not set up, all menu items will
be hidden.

You can check the latter by:
select count(*) from menu_acl;

The former is probably better directly addressed rather than checked.

Does this make sense?

Best Wishes,
Chris Travers

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
#
# ./lsmb.sh 2>&1 | tee freshbuild.log
#

set -o xtrace

echo get latest svn and diffuse local changes

cd lsmb130
svn status
cd ..

diffuse ./LedgerUpg/1.2-1.3-manual.sql ./lsmb130/sql/upgrade/1.2-1.3-manual.sql
diffuse ./LedgerUpg/MY-reload_modules.sh ./lsmb130/sql/modules/reload_modules.sh
diffuse ./LedgerUpg/ledgersmb.conf ./lsmb130/ledgersmb.conf.default

echo preparing clone DB for the 1.3 upgrade

dropdb lsmb13
rm -f ./LedgerUpg/lsmb-to-1.3.sql

dropuser ledgernew

pg_dump -C lsmbprod > ./LedgerUpg/lsmb-to-1.3.sql
pg_dump --inserts -C lsmbprod > ./LedgerUpg/dbg-lsmb-to-1.3.sql

sed -i -e's/lsmbprod/lsmb13/g' ./LedgerUpg/lsmb-to-1.3.sql
sed -i -e's/ledgersmb/ledgernew/g' ./LedgerUpg/lsmb-to-1.3.sql

sed -i -e's/lsmbprod/lsmb13/g' ./LedgerUpg/dbg-lsmb-to-1.3.sql
sed -i -e's/ledgersmb/ledgernew/g' ./LedgerUpg/dbg-lsmb-to-1.3.sql

createuser  --no-createdb --no-createrole --no-superuser ledgernew

psql -f ./LedgerUpg/lsmb-to-1.3.sql 

echo Fixing the 1.2 DB in preparation for the 1.3 upgrade

psql --username=ledgernew -f ./LedgerUpg/fix-up-1.2.sql lsmb13
psql --username=ledgernew -f /usr/local/lsmb130/sql/upgrade/1.2-pre-upgrade-checks.sql  lsmb13

echo Loading the code

tar --exclude='.svn' -czf LedgerUpg/ledgersmb-latest.tar.gz ./lsmb130


cd /usr/local

sudo rm -rf lsmb130/

# sudo tar --transform='s/^ledgersmb/lsmb130/' -x -z -f /PATH/TO/projects/thirdparty/LedgerUpg/ledgersmb-1.3.0_rc4.tar.gz 

sudo tar -x -z -f /PATH/TO/projects/thirdparty/LedgerUpg/ledgersmb-latest.tar.gz 

cd lsmb130

sudo perl Makefile.PL
sudo make

echo Load in the local customizations

sudo cp /PATH/TO/projects/thirdparty/LedgerUpg/ledgersmb.conf ./
sudo cp /PATH/TO/projects/thirdparty/LedgerUpg/1.2-1.3-manual.sql sql/upgrade/
sudo cp /PATH/TO/projects/thirdparty/LedgerUpg/MY-reload_modules.sh sql/modules

cd /usr/local
sudo chown -R www-data:www-data lsmb130

cd lsmb130
psql -a -f sql/upgrade/1.2-1.3-manual.sql lsmb13
echo
echo module reload
echo
cd sql/modules
pwd
sh ./MY-reload_modules.sh lsmb13
echo
sed -e 's/<?lsmb dbname ?>/lsmb13/g' Roles.sql | psql -U postgres lsmb13
echo
psql -a -f /PATH/TO/projects/thirdparty/LedgerUpg/roleplay.sql lsmb13

Attachment: lsmb-2.jpg
Description: JPEG image