วันพฤหัสบดีที่ 2 พฤษภาคม พ.ศ. 2556

Updating ports through SVN (subversion) instead of csup

เมื่อวานมีเวลามาลองติดตั้ง Freebsd อีกครั้ง จึงลอง update ports โดยใช้ cvsup เป็นเรื่องเลย เพราะมีข้อความที่ไม่เคยเจอมาก่อนปรากฎขึ้นมาในขณะที่ติดตั้งโปรแกรมใหม่ อ่านแล้วได้ใจความว่ามีการเปลี่ยนแปลงจาก cvsup มาเป็น svn(subversion) แล้ว ทำไงดี มันคืออะไร เลยหาข้อมูลได้ความว่าอย่างนี้

Updating ports through SVN (subversion) instead of csup

Changing over to SVN for updating your ports:
1. You’ll want to get SVN installed as root….
cd /usr/ports/devel/subversion && make install clean && rehash
(you can run with the defaults in the config screen)
2. Now I find that deleting the old ports tree that I built over time using csup cleans up any garbage that can be in there (old distfiles you forgot to clean, INDEX-*, and more). Then I do the following….
rm -rf /usr/ports/ && mkdir /usr/ports && rehash
Keep in mind with root permissions already with you, that the ports directory will automatically be built with the correct permissions. I through in a rehash because the system hated me twice, on two different servers, for killing the /usr/ports directory and recreating it… the rehash wakes up the system to the change.
3. From here, and this is where I found the instructions distracting… If you are reading this, you probably aren’t a developer, in fact, you just want a fresh copy of the ports tree so you can run portupgrade or whatever method you like to use. The directions that I found out there require logins and more, but that’s because “you are a developer” from the perspective of the authors…. Our lives our easier than those instructions by using….
svn co svn://svn.freebsd.org/ports/head /usr/ports
The co is just “copy” and from there, I would do a portupgrade -ar , which will rebuild that INDEX-* file in /usr/ports and correctly continue from where it should as if you did a csup.
4. So how do you update for new ports???? Simple…
svn update
that’s it…

Now, what about updating the /usr/src… I normally don’t do that, I leave that to freebsd-update fetch and freebsd-update install , but if you HAD To rebuild it, it would be:
rm -rf /usr/src/ && mkdir /usr/ports
svn co svn://svn.freebsd.org/base/release/8.2.0 /usr/src (or whatever release you wanted)
freebsd-update fetch
freebsd-update install

Though there isn’t a huge reason for us end users to change, IMO, it is way easier for the developers to make changes and slip in updates, plus, on our end we do enjoy a faster process than csup does for updates.

ที่เป็นตัวฉัน

รูปภาพของฉัน
เรียนภาษาอังกฤษมา แต่ชีวิตผกผันให้ต้องมาเป็น admin ซะนี่ เล่นเอาซะมึน และงงตามลำดับ คิดอย่างเดียวว่า เป็นอะไรเป็นได้ถ้าใจอยากเป็น อุปสรรคคือแบบฝึกหัด ท้อแต่ไม่เคยถอย คิดไว้เสมอ ความพยายามอยู่ที่ไหน ความสำเร็จอยู่ที่นั่น ถ้าพยายามก่อน ก็ชนะแล้ว 50% อีก 50 % ใช้ความสามารถเอาเอง