פלאנט תוכנה חופשית בישראל (Planet FOSS-IL)

14 March, 2023

Guy Rutenberg

AVIF support in Digikam on Debian

In order to have AVIF support in Digikam in Debian, you need to install kimageformat-plugin.

$ sudo apt install qt5-avif-image-plugin kimageformat-plugins

Alternatively, similar support is offered via qt5-avif-image-plugin, but Debian recommends the kimageformat-plugin for general users.

14 March, 2023 09:26 PM

Split DNS using systemd-resolved

Many corporate environments have internal DNS servers that are required to resolve internal resources. However, you might prefer a different DNS server for external resources, for example 1.1.1.1 or 8.8.8.8. This allows you to use more secure DNS features like DNS over TLS (DoT). The solution is to set up systemd-resolved as your DNS resolver, and configure it for split DNS resolving.

Starting with systemd 251, Debian ships systemd-resolved as a separate package. If it isn’t installed, go ahead and install it.

$ sudo apt install systemd-resolved
$ sudo systemctl enable --now systemd-resolved.service

Create the following configuration file under /etc/systemd/resolved.conf.d/99-split.conf:

[Resolve]
DNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com

Domains=~.
DNSOverTLS=opportunistic

Domains=~. gives priority to the global DNS (1.1.1.1 in our case) over the link-local DNS configurations which are pushed through DHCP (like internal DNS servers).

DNSOverTLS=opportunistic defaults to DNS over TLS but allows fallback to regular DNS. This is useful when corporate DNS doesn’t support DNS over TLS and you still want to resolve corporate internal domains.

Restart systemd-resolved to reload the configuration:

$ sudo systemctl restart systemd-resolved

The final step is to redirect programs relying on /etc/resolv.conf (possibly through the glibc API) to the systemd-resolved resolver. The recommended way according to the systemd-resolved man page is to symlink it to /run/systemd/resolv/stup-resolv.conf.

$ sudo ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

F5 VPN

F5 VPN doesn’t play well with the above configuration. First, F5 VPN tries to overwrite the DNS configuration in /etc/resolv.conf, by removing the existing file and replacing it with its own (pushing corporate DNS server configuration through it). The solution is to prevent F5 VPN from deleting the /etc/resolv.conf, by setting it to immutable. However, we cannot chattr +i a symlink. We have to resort to copying the configuration statically, and then protect it.

$ sudo cp /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
$ sudo chattr +i /etc/resolv.conf

Finally, because now F5 VPN can’t update the DNS configuration, we would have to manually configure the corporate DNS servers and the search domains.

$ sudo resolvectl dns tun0 192.168.100.20 192.168.100.22
$ sudo resolvectl domain tun0 ~example.corp ~example.local

14 March, 2023 02:34 PM

06 March, 2023

Ilya Sher

The Case for Concise Posts

According to DiSC, about a quarter of all people should be communicating like me. We want information, not fluff or stories. We are here to get the answer to our question: “what’s X?” (a technology, a format, a piece of software, etc). Yet, the number of blog posts which answer “What’s X?” concisely is roughly zero. I am going to fix this with my future posts as time allows. Stay tuned.

Everything below is implementation detail. You can stop reading here and save a few minutes.

Here is my plan. Feel free to use it as a guideline for your blog posts too.

Discretion

We are looking for the author’s discretion about what’s important (hint: typically concepts and architecture), not a dump of everything that the author knows about the topic. We are here for “I would have written a shorter letter, but I did not have the time“. Yes, that 5 minutes read should take hours if not days to write. Otherwise, what’s the value?

Can’t answer the question concisely? We doubt your understanding of the topic.

Context

“Context is important, the blog post must provide context, blah blah …”.

The context was already established by searching “what’s X” or following a link to the post. It’s annoying when the text starts with fluff, keeping us wondering when and whether my question will be answered.

If there is some *really* important context, that’s not 5 paragraphs. Sorry, storytellers.

Show why the Topic is Important

“You need to show why X is important and where it’s used”.

This information is available in every other blog post and/or on Wikipedia and/or is one search away.

Underlying Concepts

Don’t explain the underlying concepts, link to them (like DiSC above). Don’t waste our time if we already know that.


Stay tuned.

06 March, 2023 08:19 AM

03 March, 2023

Hamakor

הזמנה לאסיפה כללית של העמותה – 3.3.23

עדכון: ​בעקבות עיכוב בהכנת הדו"ח הכספי, לא תתבצע הצגתו לאספה והצבעה על אישורו במפגש זה, אלה יידחו ​לאספה נוספת שתפורסם בהמשך. מעבר לשינוי זה לא חל שינוי בפרטי האסיפה כפי שפורטו קודם לכן.

שלום לחברי וחברות עמותת המקור, ידידים וידידות, ושותפים ושותפות לדרך,

בתאריך 3.3.23, ביום שישי בשעה 13:00 (בסוף כנס "אוגוסט פינגווין 2023") תכונס אסיפה כללית של עמותת המקור – עמותה ישראלית לתוכנה חופשית וקוד מקור פתוח (ע"ר). 

שימו לב: האסיפה פתוחה לכלל חברי העמותה, ולא רק למשתתפי "אוגוסט פינגווין"

האסיפה תתקיים במתכונת היברידית:

  1. בבית ציוני אמריקה (רחוב דניאל פריש 1) בתל אביב, בשעה 13:00 ביום שישי ה-3.3
  2. אונליין דרך זום – קישור להתחברות לזום 

לוח זמנים:

במידה ובמועד שנקבע לא יהיה קוורום (רבע מכלל חברי העמותה), האסיפה תדחה בשעה ותתקיים באותם אמצעים, בכל הרכב שהוא (במקרה כזה הלו"ז מעלה עשוי להשתנות).

במהלך האסיפה יתקיימו בחירות לוועד ולוועדת ביקורת

נשמח להצטרפותכם כחברי וועד / וועדת ביקורת!
במידה ותרצו להתמודד, אנא שלחו מייל ל: [email protected]
בנוסף – אנא וודאו שאתם רשומים כחברים בעמותה לפני הכנס (הצטרפות כידידי/חברי העמותה, שדרוג מעמד מידיד/ת לחבר/ת העמותה)

פרטים טכניים

אנו מקווים שדיון על כל נושא בסדר היום, יתקיים בפורומים של העמותה, בכתב, לפני האסיפה. זאת, הן משיקולי אסינכרוניות והן משיקולי חיסכון בזמן באסיפה.

הצבעות יתקיימו באופן גלוי לחלוטין, משיקולי זיהוי. משתתפים פיזית – תתבצע הצבעה בהרמת יד. 

משתתפי אונליין – לא תתאפשר הצבעה ללא הזדהות ויזואלית בוידאו, לכן, אנא בידקו את המצלמה טרם תחילת האסיפה.

חבר/ת עמותה שירצו להשתתף בהצבעות אך לא יוכלו להשתתף באסיפה, יוכלו לשלוח הודעת ייפוי כח לועד, המפרטת את ההצבעות, עם חתימתם (כן, הפיזית, מצולמת, על הדף שבו כתובות ההצבעות. לא חתימה דיגיטלית). למען הסר ספק, משתתפים באמצעות ייפוי כח לא יספרו לצורך קוורום, אלא רק יחשבו בהצבעות.

אנו מזכירים לכולם לשלם את דמי החבר לעמותה. הודעה על מצב התשלום תצא לחברי וחברות העמותה. 

לנוחיותכם קישורים להצטרפות כידידי/חברי העמותה וכן לשדרוג מעמד מידיד/ת לחבר/ת העמותה.

בברכה,

ועד עמותת המקור

The post הזמנה לאסיפה כללית של העמותה – 3.3.23 first appeared on המקור.

03 March, 2023 11:22 AM

26 February, 2023

Boris Shtrasman

כותב על תוכנה חופשית, תוכן חופשי, או סטנדרטים חופשיים ? צרף את הפיד שלך לפיד המקור כך כולנו נלמד ממך.

לפני זמן מה מישהוא הדליק את הלפיד, בנתיים יש הרבה מקומות בהם לא רואים את האור של הלפיד ההוא.
 
מפה לשם הכתובת להוספת אנשים השתנתה (אפשר לבקש מהמקור), אבל הרעיון עדיין חי ובועט.
 
אז אנשים טובים ורבים כותבים פוסטים בבלוגים שלהם וגם בטוייטר שלהם על תוכנה חופשית , על לינוקס, על קוד פתוח , ועוד דברים קשורים הרבה פעמים יוצאים להם פוסטים מדהימים ששווה שיגיעו לאגרטור של התוכנה החופשית העברית.

כמעט כל מערכת בלוגים יש לה ייצוא rss או atom, לכם הכותבים המקומיים על התוכנה החופשית יש עוד מקום נחמד שקיים כבר שנים רבות. זה הוא הפלאנט של עמותת המקור. 

planet.hamakor.org.il. 
 
לוקחים את פיד ה RSS (או ATOM או אחרים) מבקשים להצטרף לפלאנט והופ גם אתם שם.

למי שמשתמש ב write freely מה שצריך לעשות זה לקחת את הדומיין שקיבלתם ולהשתמש ב feed תחתיו. לדוגמה : 
user.domain.tld/feed אם הדומיין שלכם הוא user.domain.tld.
 
בוורדפרס ובלוגר צריך להפעיל את הפיטצ'ר ידנית.

במקור נאמר :

זאת הזדמנות טובה להזכיר שהפלאנט פתוח לכל מי שכותב על תוכנה חופשית, ואשמח לצרף כמה שיותר אנשים. בסופו של דבר המטרה היא לרכז במקום אחד את מה שכותבי חברי קהילת התוכנה החופשית בארץ ובכך לעודד החלפת של רעיונות ודיעות בנושאי תוכנה חופשית.

 

 

26 February, 2023 01:26 PM

21 February, 2023

Boris Shtrasman

משלוח כסף ע"י מספר טלפון או איך יהיו עכשיו המון הונאות לאנשים

ראיתי כתבה של עורך הדין שאני די מעריך,הכתבה מאוד מנומנסת ומסבירה מדוע הרעיון בבסיסו הוא טוב אבל היישום לא משהוא, האמת הוא היה יותר מדי עדין. למה עדין ? הוא אמנם הזכיר את אחת ההתקפות שאני מתאר כאן, אבל לא הסביר עד כמה התקפות כאלה פשוטות.
 
הולך להיות מאוד שמח בתקופה הקרובה. כמה שמח ? כל אדם שיש לו חשבון בנק ומספר טלפון ידוע חשוף להונאות שהוא לא ממש יכול להתגונן מפניהן. אם בעבר הונאות היו ניתנות למניע ע"י הסתרה של חשבון הבנק של המשתמש ואי שימוש בצ'קים או כל מני אפליקציות למשלוח כסף שלהם יש הרשאה , עכשיו יהיה מספיק לקבל את מספר הטלפון של הקורבן בשביל לזייף פעולות בשמו. ובדיוק כמו שאם למישהוא יש שיק שלכם הוא יכול בקלות לזייף בשמכם, משלוח תמונת שיק או שיק בדואר מוריד את האחריות מהבנק בחלק מן המקרים כי המשתמש צריך לדעת שמדובר במדיום לא בטוח והלקוח לא .כנראה גם פה אתם תצטרכו להוכיח כי לא אתם אשמים (נכון שקראתם את החוזה היפה בחוזה מול הבנק או כשהתקנתם את האפליקציה להעברת כספים )

מדוע יהיה שמח תשאלו ? מי שעוסק בתקשורת בשלושים השנים האחרונות יודע כי SS7 מאובטח או הודעות SMS עם סיסמה חד פעמית בטוחה כמו שאני זכיתי בפרס נובל לפיזיקה.
 
כל אדם יכול לרכוש שירות של זיוף וחטיפת מספר, לזייף מספר יוצא עולה גרושים,לזייף מספר ולקבל שיחות באותו המספר עולה הרבה יותר במדינות מסוימות מדובר על עשרות דולרים לכל מספר (למזלנו בתחום יש המון הונאות , אז האנשים הפשוטים לא חוטפים בצורה הזאת המון), 
 
לא ידוע לי כי מימשו אימות לחשבונות אלפה-נומריים בהודעות בארץ. ואני לא יודע מתי יתבצע אימות למספרים בשיחה, אבל בדיוק כמו שאפשר לזייף שולח סמס אפשר לזייף שיחה נכנסת (שיטה שונה אבל הרעיון זהה).
 
אני מכיר מספר אירגונים , שכל כך התרגלו שיש להם התקפות spear-phishing שהם פשוט לא משתמשים יותר ב SMS ושיחות מטלפוניה קלאסית, הם רק משתמשים בVoIP פנימי וזהוא. בהתקפה הגדולה במוזמביק דובר על תשלום של $15 לכל מספר (כן חמש עשרה דולר).
 
איך זה עובד ?
בחלק מהחברות סוגרים עסקה עם עובד מושחת (זה יוצא די זול במושגים שלנו) , במקומות אחרים יש מספר חברות שמאפשרות לכם לחטוף מספר טלפון במחיר של כמה אלפי אירו ליום (כתבה על הנושא אינני יודע אם השרת שם אמיתי או גם הונאה ויש המון הונאות בתחום), ותוכלו מכל נקודה בעולם לזייף ולחטוף מספר טלפון ב SS7, בארצות הברית למשל חסמו את הבעייה הזאת רק לפני שנתיים, אצלנו אלוהים יודע. בשנת 2021 היו 1600 תלונות של חטיפת מספרים ל FBI (ברור לנו שלא כולם מתלוננים לשם). חתיפות מספרים אפשרית בכל ספק המחובר להרבה מאוד ספקים. בהתקפות בברזיל היו הפסדים של 50K$ פר משתמש למשל. בכל הפתרונות צריך ציוד חיבור ל ספק המוכן לבצע את הפעולה (מספיק עובד אחד מושחת) ובדיוק כמו AS המוכן לבצע את הפעולות חטיפת כתובות BGP גם ב SS7 זה תמיד יכול להתקיים.

בצורה מאוד מופשטת הרעיון הוא ששולחים שרשרת הודעת בפרוטוקול SS7 ומעבירים את מקבל השירות למקום אחר, לבעל מספר הטלפון יש את האפשרות להתחיל לבכות יפה ולראות אחרים עושים שיחות , חוטפים את ה SMSים שלו, תודות לעובדה שקיים שירות MSISDN-less בחלק מספקי האינטרנט במספר מדינות, ניתן לגלוש "על חשבונו" של אדם אחר.

במקרה של SIP Trunk תודות לעובדה שספקי ההולכה לא תמיד בודקים ומוודאים מספרים נכנסים (למרות שקיימים מספר תקנים בנושא) , כל אדם שיש לו הבנה בסיסת בלהתקין שרת SIP (ממליץ אל אסטריסק בגלל פשטות ההתקנה שלו) יכול להגדיר את המספר היוצא שלו לכל מספר שירצה , ואם ספק ה sip-trunk שלו לא מבצע אימות למספרים יוצאים (כשאתה מגדיר מספר טלפון , הוא שולח סמס ואתה צריך להכניס את המזהה בתוך המערכת), יופי הוא יחייג מהמספר הזה לכל אדם , וזה מה שתראו על צד המקבל.
 
האם זה יעבוד אצל ספק ? ממש לא יהיו ספקים שיחסמו מספרי טלפון נכנסים שאינם בבעלות שולח הSIP trunk, כמו כן חלק מהספקים בודקים ומאמתים כי כל מספר יוצא הוא בהחזקה של המשתמש, אבל אתה כלקוח אין לך דרך לדעת אם הספק סוגר או לא.

הדגמה יפה של David Strejc בנושא איך הוא משתמש באסטריסק עם ספק במדינה אחת בשביל לבצע שיחות במדינה שניה, למעשה כל שרת ולקוח SIP יוכלו לבצע זאת. הוא משתמש פה באסרטיסק אבל ניתן לבצע זאת מכל תוכנה חופשית שממשת שרת SIP. לא הייתי ממליץ לכם לעשות זאת, אבל טכנית זה אפשרי, הגדרת ה CLI באסטריסק.

בחלק מהסויטצים ו ה SBCים קיימת הגדרה לחסום את זה, אם אתם משתמשים ב OpenSer צריך לממש זאת לבד, כברירת מחדל במקומות בה זה קיים זה לא מופעל כברירת מחדל (אתה לא חוסם העברת מספר שביצע forwarding כברירת מחדל מהפחד שדברים ישברו).

אפשר גם לשלוח SMS ים ככה עם הספק שלכם מאפשר (בדר"כ כן בתוך המדינה של הספק אבל לא לבן לאומי ) , SMSים ב SIP עוברים תחת SIMPLE ולא כל הספקים תומכים בזה. אינני מכיר ספק אחד שממיר כמו שצריך sip/sigtran. איך אפשר לשלוח SMSים אפשר להשתמש ב yate-qt אבל אפשר אפילו להשתמש ב sipp (או ב sip-tester שמגיע מהמארגים שלכם)
 
קבלת SMS : קיימת אפשרות בצורה כזאת רק בחלק מספקי התשתית ובדר"כ לא .
 
לרוב המכריע של האנשים אין מכשיר דוגמת YubiKey שמאמת עבודה עם חשבון הבנק,עם יש לכם אפשרות להעביר כספים באמצעות אפליקציה או שיחת טלפון מאוד מאוד רצוי שיהיה לכם אימות YubiKey, כי אם לא , לזייף העברה לא  עולה לכם דבר. לצערי הרב yubikey איננה חומרה חופשית, מצאתי אמנם קוד פתוח שלהם github.com/Yubico וגם מצאתי את היצרן SoloKeys שטוען כי הוא גם מכיל firmware פתוח אבל לא הכל מושלם שם.

למעשה הנחיית CISA היא לעבור להשתמש ב FIDO/U2F או לעבור ל PKI לכל אירגון, אבל היום עדיף לכל אדם פשוט לעשות זאת, שימוש בPKI פשוט יותר, אבל לא נתקתי בשום בנק או אירגון שמאפשר זאת למשתמשים שלו.

לדעתי האישית כל מפתח אתרים צריך להכניס flow בו הוא מאפשר שימוש התחברות ע"י U2F או לפחות תעודת לקוח (client certificate) כברירת מחדל , ורק אם אין אז לאפשר שם משתמש וסיסמה.

אז נניח בחור נחמד שיש לו כמה אלפי יורו בחשבון ,הוא משתמש באפליקציה ניהל החשבון בטלפון שלו. 

תוקף רוכש שירות חטיפת SS7 , ולצערינו הוא לא נפל על הונאה וקיבל את הדבר האמיתי, הוא חוטף מספר ועכשיו הוא יכול לבצע פעולת הזדהות (התקנה מחדש ) לטלפון חדש , מבצע העברה על מיליון יורו ללקוח אחר והופ הלך הכסף. 

אדם אחר משתמש ב sip-trunk ולא ב SS7, מתקשר לבנק עם מספר מזוייף ומבצע קצת הנדסה חברתית והופ קביל גישה (בגלל שהטלפון שמופיע אצל מקבל השיחה הוא המספר הנכון).

לעולם לא סומכים על אף שיחה נכנסת או SMS נכנס , עלות הזיוף של זה אפסית , יכולים להתקשר אליכם ויגדו שהם עובדי הבנק  או משטרה , וישלפו קצת מידע ממכם בשביל להבצע הונאות. כבר היו מקרים (ודי הרבה).

הסתקלתי על פרסומי מספר בנקים, האפליקציות שלהם לא בקוד פתוח , אינן יכלות לעבוד על גנו/לנוקס ללא אמולטור וככאלה אינן משהוא שהייתי ממליץ להשתמש למי שאני דואג לו. בדקתי מספר אתרים ורק ללקוחות עסיקיים ראיתי שקיימת אפשרות להשתמש במפתח חכם אבל לא ראיתי שום התייחסות ל U2F

21 February, 2023 07:58 AM

18 February, 2023

Diego Iastrubni

שידרגתי את השרת הזה

לפני

[email protected]:~# cat /etc/debian_version  
10.13

אחרי:

[email protected]:~# cat /etc/debian_version  
11.6

השרת Next cloud אצלי גם שודרג מגרסה 23 אל 25 – וזה היה האתגר לשינוי. אני צריך את האפליקציה הזאת ב־next cloud והיא לא הייתה זמינה. גם לא קיבלתי עדכונים – כי גרסת php שלי הייתה נמוכה מדי..

השידרוג של דביאן היה פשוט. רק עדכנתי את /etc/apt/sources.list ואז עשיתי

apt dist-upgrade --auto-remove --purge

הבעייה היחידה שלי הייתה בהגדרות של nginx שבה הייתי צריך לשנות מיקום של php-fcm socket (היה טריויאלי).

לעומת זאת – שידרוג של next cloud כרגיל מאוד לא ישיר (קפצתי שתי גרסאות, וזה אומר לבצע שני שדרוגים..) ואחרי כל אחד מהם ללכת לשורת הפקודה ולייצר אידקסים של בסיס נתונים (occ עושה את זה…) ואז לאט לאט להשתיק את ההמצלות שלו… מעניין אם זה מעיק בכוונה תחילה.

הטקסט המלא

18 February, 2023 03:12 PM

29 January, 2023

Ilya Sher

Event Loop for Beginners

The aim of the post is to give a simple, concise, and high level description of the event loop. I’m intentionally leaving out many details and being somewhat imprecise.

If you need detailed picture, follow the links in this post. In this case, I recommend reading this short post first.

Why Event Loop?

To deal with concurrency (multiple “things” need to be happening at what looks like the same time), there are few models. To discuss the models, we need to know what a thread is.

Roughly, a thread is a sequence of computing instructions that runs on a single CPU core.

Roughly, Event Loop manages on which tasks the thread works and in which order.

Queue

The queue contains what’s called in different sources messages, events, and tasks.

Message/event/task is a reference to a piece of code that needs to be scheduled to run. Example: “the code responsible for handling the click of button B + full details of the click event to pass to the code”.

Event Loop

  1. The queue is checked for new tasks. If there is none, we wait for one to appear.
  2. The first task in the queue is scheduled and starts running. The code runs till completion. In many languages, await keyword in the code counts as completion and everything after await is scheduled to run later – new task in the queue.
  3. Repeat from number 1. That’s the loop. It’s called Event Loop because it processes events from the queue in a loop.

Adding Events to the Queue

Tasks are added to the queue for two reasons:

  1. Something happened (user clicked on a button, network packet arrived, etc).
  2. The code that was running in step 2 of the event loop scheduled something to run later.

See Also

  1. Event Loop documentation at MDN.
  2. What is the difference between concurrency and parallelism? at StackOverflow

Hope this helps with high level understanding of Event Loop. Have a nice day!

29 January, 2023 06:18 PM

Ira Abramov

הפידרציה הגיעה לבלוג

לא יודע מתי תקראו את זה בעתיד, אבל פעם הייתה רשת חברתית סגורה אבל חביבה עלי בשם טוויטר. בא איש אחד בשם מאסק וקלקל אותה ופרחה לה בחזרה רשת מבוזרת כמו בימים הטובים של התחלת האינטרנט. מסטודון היה קילר אפפ שהופיע בדיוק בזמן לקלוט את חובבי המיקרובלוגינג שברחו מטוויטר וטאמבלר וצירף אותם לרשת סטטוסנט/אקטיביטי פאב שכבר כללה כמה תוכנות ניהול נוד רשתי (המקבילה של שרת דואר ברשת SMTP או שרת IRC וכולי). עכשיו אפשר לקרוא את הפרסומים שלי בתור הודעות ברשת הזו בזכות תוסף וורדפרס.

אז אם אתם מחפשים אותי כי לטוויטר אני נכנס פחות ופחות, אני @I

שרתי אקטיביטיפאב בעברית (מתוך אלפים שהוקמו) הם נכון להיום בעיקר על בסיס מסטודון אבל לא רק:

ועוקב אחרי כולם אתר פיד עברי.

בקיצור, בעוד רגע אלחץ פה על "פרסום" והפוסט יופיע פה. יאללה, תעקבו, נראה מה זה שווה?

29 January, 2023 04:52 PM

25 January, 2023

Hamakor

אוגוסט פינגווין 2023 יוצא לדרך!

כנס אוגוסט פינגווין 2023 יתקיים ב-3 למרץ, יום שישי, בין השעות 8:30 ל-14:30, בבית ציוני אמריקה בת"א.

כנס אוגוסט פינגווין הוא הכנס השנתי של קהילת התוכנה החופשית והקוד הפתוח בישראל המאורגן על ידי העמותה. הכנס נערך בעבר ביום שישי הראשון של חודש אוגוסט, ומכאן שמו, אם כי בשנים האחרונות הפינגווין נדד גם לחודשים קרירים יותר. הכנס מהווה מפגש חברתי לחברי העמותה ולפעילי קוד פתוח ותוכנה חופשית בישראל, כמו גם במה להרצאות (כלליות או טכניות), עדכוני מצב של פרויקטים ועוד.

לאתר הכנס (להגשת הרצאות/פעילות, רכישת כרטיסים, ועוד): https://ap.hamakor.org.il

The post אוגוסט פינגווין 2023 יוצא לדרך! first appeared on המקור.

25 January, 2023 12:52 PM

03 January, 2023

Meir Kriheli

מצגת ההרצאה HTML over the wire

הרצאה אודות htmx והצורך בפתרונות כאלה במסגרת PyWeb-IL 101.

03 January, 2023 03:46 PM

19 December, 2022

Omer Zak

Convert Apache2.4 configuration and rewrite rules into Nginx configuration

Those days I am moving my website from Apache2.4 to Nginx.

So I googled for “convert apache rewrite to nginx”. I found the folllowing articles:

In addition to the aforementioned articles, I found the following SaaS services for converting Apache2.4 configuration files into Nginx configuration files.

I recommend that you run your conversion in both winginx.com and getpagespeed.com, review and edit the resulting Nginx configuration file.

19 December, 2022 12:44 PM

13 December, 2022

Hetz Ben Hemo

סידורים אחרונים – וסוגרת את הבסטה הזו

את הבלוג הזה אני כותבת שנים רבות (כולל גירסת הארכיב) – עוד משנת 2006 (עוד מהימים שהנאיביות שלי היתה בשיאה…). כתיבה בבלוג הזה עזרה לי ולאחרים מבחינת שיתוף מידע, מבחינת עבודה ומבחינות נוספות, ואם מאן דהו ישאל אותי איך הוא יכול לקבל חשיפה יותר גדולה בשביל העסק שלו או בשביל עצמו – אני עדיין יאמר שבלוג הוא פתרון מעולה, אם כי כדאי לחשוב גם על אופציות כמו יוטיוב ואולי אפילו אינסטגרם או טיקטוק, תלוי בתחום..

הגעתי למצב שבו יש לי בכל זמן נתון כ-9 בלוגים שאני מתחזקת, חלקם פתוח לציבור וחלקם מיועד לסקטורים מסויימים והתוכן לא זמין, ולכן החלטתי להתחיל לאחד דברים כך שאוכל להקדיש את זמני הפנוי לתכנים בכמות קטנה של ערוצים, ולהלן הסדר החדש:

ערוצי יוטיוב

אני מודה כי בעבר עשיתי סלט שלם מבחינת קליפים ומיקומם בערוצים השונים, ולכן גם כאן דברים ישתנו:

לסיכום: ערוצים ירדו, ערוצים אחרים יעודכנו, ואתם תוכלו לפי הדברים שמעניינים אתכם – לקבל את המידע ממני בכמות קטנה של אתרים וערוצים.

ברצוני לנצל הזדמנות זו בכדי להודות לכל הקוראים והמגיבים והמשתתפים. בלעדיכם – זה לא היה קיים, ולכן – תודה לכם 🙂

הטקסט המלא

13 December, 2022 12:17 PM

11 December, 2022

Omer Zak

Cheatsheet for doing rsync for archiving

# -avHAX:
# -a = archive (equivalent to -rlptgoD)
#      -r = recurse into directories
#      -l = copy symlinks as symlinks
#      -p = preserve permissions
#      -t = preserve modification times
#      -g = preserve group
#      -o = preserve owner (requires sudo)
#      -D = --devices --specials
#           --devices = preserve device files (requires sudo)
#           --specials = preserve special files
# -v = verbose
# -H = preserve hard links
# -A = preserve ACLs
# -X = preserve xattrs
#
# Before actual work, you may want to use --dry-run.
sudo rsync -avHAX --progress --exclude-from=- $SRCDIR $DESTDIR <<EOF
- /temp/***
- /trash_script.sh
EOF

11 December, 2022 08:13 PM

Diego Iastrubni

שעונים חכמים חופשיים

בעבר רציתי שעון חכם וקניתי שעון חכם שתומך ב־AsteroidOS. זה התברר בתור דבר פשוט מיותר… והחלטתי למכור את השעון. אני לא ממליץ על המערכת הפעלה הזאת, היא פשוט לא טובה.

אז יש בחור שהתחיל לעשות מכשיר חכם מאפס מאפס. קוראים לו פאול.

המיזם זמין בכתובת https://open-smartwatch.github.io . יש תרשימים סכימטים, קוד למערכת ההפעלה, קבצים למדפסות תלת מימד ועוד. יש גם חנות שבה אפשר לקנות את החומרה מוכנה – https://www.makerfabs.com/open-smartwatch.html . אני לא ממליץ – זאת הגרסה הראשונה שנראית מגעילה. הגרסה השקופה, בצבע שחור נראית לי הכי יפה, אבל גם הגרסה הלבנה (הדקיקה עם המסך ה”רגיל”) נראית משהו בהחלט שמיש.

רב התיעוד שמצאתי נמצא בווידאו הזה: https://www.youtube.com/watch?v=a6kkrQ26h_4 . נראה שפשוט צריך לבנות את הדבר הזה בעצמך נכון לעכשיו, זה מצריך גישה למדפסת תלת מימד בשביל המארז עצמו, להזמין כמה חלקים מדוד עלי, כלי הלחמה וסבלנות. חומרי הגלם עולים בערך 300₪. אם מישהו קונה ורוצה לבנות לי אחד – צרו קשר!

הטקסט המלא

11 December, 2022 08:02 PM

22 November, 2022

Meir Kriheli

פייתון, Json מהיר ומספרי 128 ביט

ניסיון שימוש בספריות JSON מהירות עבור פייתון ומספרים גדולים.

22 November, 2022 04:02 PM

Gabor Szabo

Promotion: Getting my content in-front of more people

For the full article visit Promotion: Getting my content in-front of more people

22 November, 2022 06:41 AM

21 November, 2022

Gabor Szabo

Interns for Open Source projects

For the full article visit Interns for Open Source projects

21 November, 2022 03:50 PM

03 November, 2022

Artyom Beilis

התקדמות חשובה בתמיכה ב־OpenCL ב־pytorch.

רקע

היום pytorch היא אחת התשתיות המובילות בעולם למידה עמוקה. יש לה יתרונות רבות, אבל מבחינת המפתח זה קוד איכותי ותיעוד טוב. הקוד כתוב בצורה מאוד מודרנית עם שימוש נכון ביכולות C++‎ מה שמאוד מקל על הפיתוח. אני עובד בתקופה האחרונה על פיתוח מנוע עבור pytorch מבוסס OpenCL כחלופה ל־cuda.

כבר כתבתי בעבר על חשיבות התמיכה ב־OpenCL.

אבל בכל זאת אזכיר כמה נקודות מבחינת קהילת תוכנה חופשית וקוד פתוח:

  1. אנחנו זקוקים בתמיכה חוצת פלטפורמה בכרטיסי מסך מיצרנים שונים כמו AMD, Intel וכמובן nVidia.
  2. אנחנו זקוקים למימוש האלגוריתמים המרכזיים כקוד פתוח הזמין לכל (ולא כקופסה סגורה ש־nVidia נותנת)
  3. אנחנו רוצים לעבוד עם סטנדרטים פתוחים וזמינים כמו OpenCL ולא מימושים ספציפיים של יצרן (כמו cuda).

הפרוייקט ב־github‏

אז מה חדש? קלות אינטגרציה!

עם שחרור גרסה 1.13 של pytorch חל שיפור משמעותי ב־out-of-tree-backend. עכשיו הוספת מנוע אימון מבוסס OpenCL היא פשוטה מאוד ולמעשה שאלה של מספר דקות, אפילו בוונידוס העניין יחסית פשוט. המשמעות שאפשר להשתמש במנוע OpenCL בקלות רבה הן בלינוקס והן בווינדוס.

מה עם הביצועים? אם משווים מול גרסת cuda/cudnn על אותו ה־gpu מדובר בין 50 ל־70 אחוז ביצועי cuda באימון ובין כ־60 ל־80 באבלואציה (תלוי ברשת כמובן).

למרות שהמנוע עדיין ניסיוני וחסרים בו לא מעט פעולות הוא נבדק בהצלחה על עשרות רשתות כמו resnet, mobilenet ורבות אחרות.

המנוע עצמו מבוסס על ספריית dlprimitives‏ שאני מפתח במקביל והיא חלופה ל־cuDNN על בסיס OpenCL וגם מנוע חיזוי שעובד עם מודלים בפורמט ONNX - שזה נושא גדול בפני עצמו.

מה המשמעות של זה?

  • משתמשי AMD יכולים לאמן רשתות. הם לא מוגבלים למספר מצומצם של דגמים ש־rocm תומך בהם או לשימוש בלינוקס בלבד. התמיכה היא גורפת מ־APUים ישנים כמו Stoney Ridge ועד ל־RDNA 2 וגם זה עובד על "חלונות" למי שמעוניין.

    זו הייתה משימה כמעט ובלי אפשרית עד היום. עכשיו זה במרחק מספר פקודות

  • תשתית אימון היא קוד פתוח לגמרי גם אם עובדים עם nVidia (טוב חוץ מהדרייבר שלהם)

  • כל מה שצריך זה דרייברי של OpenCL. לא צריך את כל המפלצת של cuda (מי שיצא לו להתקין לשדרג לגלות בעיות תאימות יבין אותי מידי)

מחפש עזרה...

מישהו יודע איך אפשר לבנות ולפרסם whl לפלטפורמות שונות? רצוי איזה שירות ענן שיעשה זאת? כדי שזה יהיה ממש במרחק של pip install :-)

הטקסט המלא

03 November, 2022 10:31 AM

02 November, 2022

Kaplan Open Source Consulting

כנס GIS בקוד פתוח למגזר הציבורי

כנס GIS בקוד פתוח 2022 למגזר הציבורי, נובמבר 2022

כנס GIS בקוד פתוח חושף את המגזר הציבורי לפתרונות הקיימים וליוזמות של גופים מקבילים. הדוברים/ות בכנס יציגו מגוון רחב של פרויקטים העושים שימוש בכלים השונים.

בשנים האחרונות אנחנו רואים מגמה של אימוץ GIS בקוד פתוח על ידי גופי ממשלה וגופים מוניצפאלים רבים, זאת בין היתר בעקבות האתגרים שהציבה מגיפת הקורונה לצד יתרונות טכנולוגיים ועסקיים בנושאי הסרת מגבלות רישוי תוכנה.

בכנס נדבר על מהו GIS בקוד פתוח והרלוונטיות לתפקידים שונים ברשויות המקומיות, וכיצד איך הוא בא לידי ביטוי בגופי הממשלה. מה ההבדל בין קוד פתוח למידע פתוח ואיך פותחים את המידע לציבור בצורה הנכונה. נציג פרוייקטי GIS שנעשו בזכות פתיחת מאגרי מידע לציבור.  נראה גם יוזמות ממשלתיות בנושא מעקב והנגשת מידע אודות תחבורה ציבורית, כולל יכולת תחקור עבור כל הרשויות בארץ. כל אלה לצד היתרונות של קוד פתוח במעבר לענן הממשלתי (נימבוס).

מתי: רביעי, 9.11.22 9:00-13:00

מיקום: תל-אביב  או בזום (לבחירתכם)

הרשמה בקישור: https://forms.gle/b18bbnKm8xbUKdxJ6

ההשתתפות ללא תשלום, אך יש להירשם מראש.

עדכונים על כנסים וארועים נוספים הרשמה לניוזלטר 

02 November, 2022 03:08 AM

28 September, 2022

Hetz Ben Hemo

הטעות של רד-האט בנושא תמיכה במקודדי וידאו

אחד הדברים המבורכים בהפצות לינוקס – זו היכולת לקרוא את הדיונים לגבי שינויים שנעשים בהפצות לינוקס, דעות, בעד ונגד. במקרים רבים ישנם החלטות ודיונים פנימיים, אולם בד"כ התוצאות של הדיונים יוצאות בהודעה מסודרת ב-Mailing List הרלוונטי.

דיון מעניין שחל אתמול קשור להפצת Fedora ולהחלטה לבטל כל האצה של קידוד או פריסת וידאו בהפצת הלינוקס ברמת תשתית כברירת מחדל. במילים אחרות: אם מאן דהוא יפעיל מצלמת Webcam ברזולוציית 1080P והוא ינסה להקליט את הוידאו (לדוגמא עם תוכנה כמו OBS Studio) – סביר להניח שהוא ימצא את התוצאות בלתי מספקות. אם הוא ינסה לנגן וידאו שמקודד ב-H.264 או HEVC או VC1, סביר להניח שבקטעי האקשן, הוא יקבל דילוגים ו"נפילות" (Dropped) בפריימים כך שהתוצאה לא תיראה טוב.

סביר להניח שמי שישתמש בהפצת הלינוקס וידע לינוקס, ימצא בסופו של דבר כי יש צורך להוסיף REPO שנקרא rpmfusion וממנו יהיה צריך להתקין חבילות של Mesa בהתאם לכרטיס הגרפי שיש במחשב/בלאפטופ (החבילות כיום עדיין אינן קיימות, למיטב ידיעתי). משתמשים חדשים לעומת זאת, שהחליטו לנסות את פדורה, יצטרכו לחפש איזה "מדריך" או איזה פוסט בבלוג כלשהו שיסביר להם מדוע יש את הבעיה ואיך לתקן אותה – לכשהם יתקלו בבעיה.

מדוע בכלל הבעיה הזו קיימת? (כפי שניתן לראות בדיון הזה, העובדה שהחבילות יצאו עם Hardware Acceleration היא בכלל באג שעכשיו "תוקן" ושישבית כל האצה) – התשובה לכך פשוטה: פחדים עלומים של רד-האט מתביעות לגבי פטנטים ותמלוגים, דבר שלא קרה כבר יותר מ-30 שנה בהפצעות לינוקס.

מכיוון שכותבת שורות אלו ייעצה בעבר לחברות שונות בקשר לפתרונות מולטימדיה ועבדה מול עורכי דין וארגוני Patent pools שונים, אז אני מכירה את הנושא די טוב וחשבתי בפוסט זה לפשט ולהסביר את הדברים בכל הקשור לפטנטים ותשלומים.

כפי שתוכלו לראות בכל מיני אתרים – ארגון ה-MPEG LA (שהוא בעצם "ארגון" שדואג למכירת רשיונות למקודדי וידאו ואודיו שונים, גביית תמלוגים, תביעת מפירים וכו') לא ממש "רודף" אחרי נגנים מבוססי קוד פתוח. הארגון מעולם לא תבע את KODI (תבעו את KODI על דברים אחרים, לא על Codecs), או את VLC או את FFMPEG או OBS Studio או כל תוכנת ניגון ו/או עריכת אודיו וידאו מהסיבה הפשוטה שזה לא שווה להם – הן מבחינת יח"צ, הן מבחינת גביה ממשית והן מבחינת רווח סופי כלשהו. (חריגה אחת היתה, למיטב זכרוני, כאשר Dolby Labs ביקשו ממפתחי החבילה ac3dec להפסיק להשתמש במינוח "AC3" מכיוון שמדובר בסימן רשום. מאז פג תוקף למושג, כך שדולבי ירדו מהעניין).

הארגון כן "רודף" אחרי יצרנים של מוצרים סופיים (בין אם הם משתמשים בפתרונות מבוססי קוד פתוח או סגור). אם לדוגמא חברה מייצרת טלפונים או טאבלטים, והיצרן רוצה לכלול קידוד או פריסה (Encode/Decode) של אודיו או וידאו עם מקודדים מסויימים, אז אותה חברה תסגור רשיון עם MPEG-LA שבו יפורטו סוגי הרשיונות (יש כמה, לא רק סוגי codecs), האם זה יכלול רק פריסה, רק קידוד או גם וגם, וכמובן סוגי Codecs. דוגמא פשוטה: חברת Lenovo מייצרת טאבלטים וטלפונים זולים, רוב המכשירים מהסוגים הנ"ל כוללים תמיכה של פריסה וקידוד במקודד H.264 אך רובם אינם כוללים תמיכה בפריסה וקידוד במקודד HEVC (זה סגור ברמת חומרה), כך שלנובו משלמת רק על H.264, לא על השאר.

אם נתרגם את זה למציאות: אם מחר אבנה נגן מבוסס Raspberry Pi שיריץ KODI ואמכור זאת כמוצר סופי, סביר להניח ש-MPEG LA יצרו קשר ויבקשו תמלוגים (ואם לא אשלם – אתבע).

בתחום מערכות ההפעלה השונות, המצב שונה. מיקרוסופט מבקשת בחלק מהמקרים מהמשתמש לרכוש לדוגמא רשיון HEVC במחיר של $1. הסיבה? מיקרוסופט נותנת מספר כלים לתצוגה ועריכת וידאו עם תמיכה ל-HEVC ורשיון Windows אינו כולל רשיון ל-encode (קידוד) בכלים שמיקרוסופט נותנת, ולפיכך דרישת התשלום (לא תופיע דרישת תשלום אם מדובר רק בניגון וידאו, לדוגמא).

בכל הקשור לניגון וידאו – יש כבר מי שמשלם את רשיון ה-Codec והוא – יצרן ה-GPU במחשב, ובדרך כלל אותו יצרן גם כותב את התמיכה להאצת ה-codec ברמת הדרייבר גם בלינוקס, כך שאין כאן צורך תשלום כפול כלשהו לניגון הוידאו, ורד-האט יכולה להתנהג בדיוק כמו מיקרוסופט (שגם היא לא משלמת על מקודדים לצרכי ניגון מדיה), אולם לצערי רד-האט לוקחת צעד אחד רחוק-מדי, ועוצרת את תמיכת הקידוד/פריסה עוד ברמת התשתית (Mesa), אפילו לא ברמת הנגן, דבר שאף אחד לא עושה ואינו נדרש מצד שום גוף רשמי כלשהו, למיטב ידיעתי.

לסיכום: רד-האט היא חלק מחברת IBM, חברה בעלת מיליוני פטנטים (גם בתחום האודיו ו-וידאו, אגב), וחבל שברד-האט לא מנסים לבדוק את העניין לעומק ובמקום זאת מקשים על משתמשים חדשים בלי שום סיבה רצינית.

הטקסט המלא

28 September, 2022 05:03 PM

14 June, 2022

Arie Skliarouk

O GTalk team, where were thou? (part IV: The END)

It is finally happened:


Google Talk is surprisingly still operational, but that ends on Thursday

Took 12 years to die:

O GTalk team, where were thou? (part III) (AKA: The other shoe dropped). (2017)

O GTalk team, where were thou? (part II) (2014)

O GTalk team, where were thou? (2010)

14 June, 2022 05:09 AM

01 June, 2022

Artyom Beilis

1984 הדיגיטלי

בעקבות פרשת טראמפ, החלטתי להבין מה קרה שם בגבעת הקפיטול. לא מהפרשנים אלא מהמקור. מה הייתה ההסתה לכאורה שגרמה להמון משולהב להתפרץ. פתחתי גוגל: trump capitol speech, הגעתי למלא פרשנויות אבל לא למקור. שיניתי גרסאות החיפוש אותה תוצאה... מוזר. פתחתי bing בקישור השני מצאתי וידאו מלא. זה צרם לי אבל המשכתי הלאה. ראיתי ש־twitter החזירו את החשבון לעת עתה.

היום מדברים בחדשות שהחשבונו נחסם לצמיתות. מעניין. Googe: twitter trump. מגיע לעשרות כתבות של חדשות על חסימת חשבון - אבל לא הקישור לחשבון עצמו. הפעם אני פותח bing במידי ובקישור הראשון אפשר למצוא את חשבונו החסום - ממקור ראשון. הפעם האסימון נפל.

1984 מויקיפדיה

זוכרים את תפקידו של וינסטון ב־1984? הוא היה אחראי על שיפוץ עיתונים ישנים ומחיקת היסטוריה לא רצויה. אם לא קראתם את הספר עד עכשיו - הזמינו אותו מיד. אז מסתבר גם גוגל התאימו את המציאות. הרי זה ידוע - אם אתה לא בגוגל אתה לא קיים! אחד כלי המחקר האינטרנטי - שנותן לנו בעצם גישה לאינסוף מידע ודיעות, עוזר למצוא מקורות הוא מונע את המידע.

עד היום לא הסתמכתי על כלי תקשורת אחד כדי לגבש עמדה על משהו חשוב - כי ידוע לכל כלי תקשורת יש אג'נדה משלו. לכן תמיד הסתכלי במספר דיווחים משני צידי המתרס. ידיעות וישראל היום. ערוץ 13, 12 ו־20 ואם הנושא חשוב באמת הייתי מחפש את המקורות - למשל קראתי את פסק דינו של אלאור אזריה. צפיתי בשידורי הבג"ץ בנושא חוק הלאום. כי לא סמכתי על פרשנויות.

אבל עד עכשיו הנחתי שחיפושים בגוגל יביאו אותי לתוכן הרצוי. מסתבר גם פה - אין להסתמך על ספק יחיד. תארו לעצמכם אם בחיפוש בגוגל אחרי פרשת תיק 4000 או המימד החמישי - כל התוצאות הראשוניות היו מביאות אותי ל"אין כלום כי לא היה כלום" או להפך "הינה הוכחה לשחיתות"... כוח עצום. כוח משחית!

ובעיקר מטריד...

טוב, מזל שכבר פיתחתי הרגלי הצלבת מקורות. עכשיו אצטרך גם להצליב מנועי חיפוש. האמת לא ציפיתי. ציפיתי שאין לצפות לפרטיות מגוגל או פייסבוק. אבל לא ציפיתי להטיה מכוונת שלא קשורה לנושאים מסחריים כמו קידום מוצרים.

טוב אז מאין תבוא הישועה? bing? duck-duck-go? yandex? יש עוד אלטרנטיבות?

מישהו מכיר מנוע חיפוש מבוסס FOSS?

התמונה נלקחה מויקיפדיה

הטקסט המלא

01 June, 2022 01:49 PM

backup and restore with duplicity

Duplicity backup utility is the old workhorse in all recent Ubuntu versions. I use the GUI called Deja-Dup for quite a while now. But until now I never bothered to check how to restore my files. I did decide to check how to restore file, because backup is only half the job! It turns out, that the GUI does a disservice for duplicity users. Restoring an encrypted backup turned out to not work. I didn't bother to research why, and turned to the CLI. This is a reminder on how to restore the files. continue reading...

01 June, 2022 01:49 PM

I am on Github sponsors now

This already happend a while ago. I am on Github Sponsors and you can support my opensource work. continue reading...

01 June, 2022 01:49 PM

Announce - CoreDNS Netbox Plugin v0.2, now with IPv6

I just released the 2nd version of my CoreDNS plugin for getting DNS records from Netbox. This release adds IPv6. continue reading...

01 June, 2022 01:49 PM

Announce - Wolkenbrot v0.3 - now with OpenStack support

I have just released WolkenBrot v0.3 with OpenStack support. WolkenBrot is my own little program to bake cloud images. The name means "Cloud Bread" in German. continue reading...

01 June, 2022 01:49 PM

Using IPython Notebook on Linux Machines in the Enterprise Corp.

A short guide for using IPython and Jupyter Notebook on remote Linux machine in the Enterprise Corp, where you don't have root rights. continue reading...

01 June, 2022 01:49 PM

blogit - new release

After a long development hiatus I am releasing a new version of blogit continue reading...

01 June, 2022 01:49 PM

Visualize almost anything with Grafana and Python

This is a short tutorial on how to build a data source for Grafana using Python Bottle micro-framework. Eventually, you can use this code to connect to any database (including SQLite). continue reading...

01 June, 2022 01:49 PM

Fooling around with JavaScript and OpenPGP

Fooling around with JavaScript and OpenPGP, as the title says. I needed to create a page in which I can encrypt files with OpenPGP. Doing this with JavaScript turned out to be possible. These are the results of my experiment. continue reading...

01 June, 2022 01:49 PM

Thoughts after leaving noris network after two years

After two years at noris network AG, yesterday was my last day with this company. It has been a long time since it felt so hard leaving a company. In my two years I worked with really great people on some of the most cutting edge technologies. All these things were not possible without the help of so many great people with whom I worked with. Some of them might read this post, so here is a big thanks. I wanted to summerize my two years and gather all the lessons I learned in one place for my future self and others too. It's quite hard summerize such an eclectic post. It's been a wild ride in noris network with lots of new technologies and ideas. We have had a lot of success. I would like to think that a great part was because we opted to work in an open source matter, even thougah not all our projects where open source. This blog post is a summary of the good things we did, and the positive leasons we learned. I hope reading through these will inspire you to choose a similar path. continue reading...

01 June, 2022 01:49 PM

23 March, 2022

Guy Sheffer

Pi Imager – community managed fork of rpi-imager

Pi Imager logo

Hey all,

I have started to maintain a fork of rpi-imager called Pi Imager. The main goal of it is to have a place to host images for anyone who wants their images downloaded and flashed with a single tool. There are already 7 extra distributions you can flash on the unofficial imager and I hope with this post this number will grow.

The changes to the official imager are:

  1. There is an unofficial category that has images you can’t get on the official imager. You can submit a pull request to this repository and add yours.
  2. Everything is automatic. You can fork it, make your own commits, and you have a working build system –
    • Every new commit to pi-imager builds a new build for Windows, Mac and Linux, ready to use
    • When you ask to add a new image and the pull request is accepted, it’s added to the global list automatically
  3. There is a feature to disable username change that can be set on the distribution side. It broke stuff in OctoPi (currently in main branch).
  4. Appimage support for Linux (fixes this issue)
  5. Trademark and colors have been removed as requested by RaspberryPi, it’s purple now!

I want to stress that the fork is here to work with the community and not to split it, you can have both installed. I have been in contact with Raspberry Pi before and after its release. It lets us have something that they can’t provide – an unofficial place that with a single click downloads and flashes community-maintained images, and lots of them.

Code and image contributions are welcome!
Get Pi Imager here

Full text

23 March, 2022 05:00 PM

15 January, 2022

Ira Abramov

התדמית של עולם התכנה החופשית על פרשת דרכים

תוכנה חופשית היא דבר נפלא. אני מאוהב ברעיון כבר כ־28 שנה מאז גרקתי אותו לראשונה. ארגנתי קהילות ואירועים להפצת ידע על ואודות חופש התוכנה, ואי אפשר לזרוק היום אבן באף ענף כלכלי בלי להתקל בתוכנה חופשית רצה איפשהוא על שרת, עמדת חיוב כרטיסים בסופר וכמובן שכל האינטרנט וכל כיס מריצים תוכנות חופשיות למכביר. אין סטארטאפ שמתחיל היום בשוק וממציא לבד את כל הגלגלים, אם זה בתוכנה, ביולוגיה או כל תחום הנדסי, אתה תלוי בתוכנה, אם זה באסטרונומיה או מכונות CNC, תוכנה חופשית היא לפעמים החנות היחידה לשאוב ממנה את הכלים הדרושים למקצוע. מצד אחד אין להתעלם, ומהצד השני אין מנוס מלהשתמש. ההתנחלות הזו בלבבות וברשימות התלות של תוכנות היא חרב פיפיות, ובחודשים האחרונים אנחנו רואים כמה צרות שמאיימות על עתיד הקהילה.

אולי המכה הכי גדולה למוצר תוכנה היא נטישה שתוביל ל"רקבון ביטים". תוכנה שלא מתעדכנת לא מקבלת תכונות חדשות אבל גם לא נסתמות בה פרצות שמתגלות. אם יש לה עדיין משתמשים אז דברים ישברו, ובכל פעם שמשהו בעולם התוכנה החופשית נשבר ומשפיע על production של חברות מסחריות, התדמית נפגעת. לאחרונה אני רואה כמה ארועים שבאו ברצף:

תזוזה קטנה ועוד אחת, מתי נענועי הסירה יהפכו אותה? הפחד שלי היא לולאת משוב ענקית שבה פתאום חברות יפחדו להשתמש במוצרים חופשיים או לתרום להם, מה שיגרום לאיבוד רוח מהמפרשים של מפתחים מתנדבים. בנקודות כאלו כדאי לזכור שהמתנדבים לא ממש מקבלים הרבה גב, חלקם אפילו לא יודעים איך לשווק את הפרויקט או לקבל תרומות גם אם ירגישו שנכון להם לבקש. המקרים של מפתחים כמו מארק סקוויירס מדאיגים אותי מאוד: בוקר אחד קם אדם ואומר לעצמו שלא משלמים לו מספיק אז הוא יתקע לכולם מקל בגלגלים (אני אפילו לא יודע אם הייתה דרך למישהו לשלם לו לפני שהתחיל להשתולל). בתגובה לא בלתי מוצדקת נחסמו לו חשבונות אצל גיטהאב ו־pypi. יש לי כמה דברים לומר למפתחים שהחליטו לפרסם קוד ברישיון פתוח – ראשית ציינו בצורה ברורה מה תנאי הרשיון (אי ציון רישיון ברור מטילה עליכם את האחריות אם למשתמשים נדפק משהו, וברירת המחדל איננה "נחלת הכלל"), ושנית היו מוכנים שיהיו לכם הרבה משתמשים מסחריים. אם לא מקובל עליכם, אל תירו לעצמכם ברגל, פצלו את הפרויקט לגרסא פתוחה ואחת סגורה בתשלום או כל דרך אחרת. לדחוף קוד ששובר את הספריה שלכם מבטיח גם נטישה של משתמשים וגם איבוד האמון בכם לעתיד, וכמובן פותח פחת לתביעות משפטיות אם הרישיון שלכם לא מצוין נכון.

ורק כדי להיות ברור: יש המון חדשות טובות בקהילה הזו, הפחד שלי הוא מהתדמית בעיני משתמשים מסחריים, שהפכו לחשובים מאוד בתהליך הפיתוח של כלים קטנים לפעמים. הקרנל של לינוקס ופרוייקטים מסביבו עדיין חיים ותוססים ושיפורים קורים השכם והערב.

ומה הפתרון? אין לי תשובה. גם ככה הרשת שלנו הפכה בעשורים האחרונים לריכוזית מדי. כל הקוד העדכני בגיטהאב. כל הידע הטכני בסטאק אוברפלו. הרשת החופשית שהתאהבתי בה כמעט כבר לא קיימת, כשכל הידע והתקשורת קורים בין הכתלים של 10 חברות (אני נדיב) ולא בעשרות אלפי אתרים מבוזרים. אם מחר גיטהאב משנה תנאי רשיון, או סטאק אוברפלו פושטת רגל זו מכה רצינית מאוד לקהילת המשתמשים. אני למשל מחזיק בבית תלתפסת שכל הידע של קהילת המשתמשים שלה היה בגוגל פלוס, ויום אחד פשוט הוסר בלי יכולת לגבותו כראוי, ורק אחוז קטן ממנו שוחזר אח"כ לאתר עצמאי אחר.

מוזמנים לתת את דעתכם ופתרונותיכם פה בתגובות, רק אל תתחילו למכור לי בלוקצ'יין. דברים ישימים בלבד :)

15 January, 2022 04:44 PM

09 January, 2022

ik

מציאת רשומה לפי התחלה מדוייקת ב PostgreSQL

הנה בעיה מעניינת – כיצד אני מביא רשומה המתאימה ביותר להתחלה כלשהי, כאשר ההתחלה משתנה באורך/תווים שלה?

בשביל להיות פחות כללי, אציג את הבעיה כך:
יש לי קידומות של מספרי טלפון ואני צריך למצוא מי ספק הטלפון שמחזיק בקידומת הזו.

כאשר אני יודע כי 2 תווים ראשונים מחזיקים תמיד בקידומת הבעיה מאוד פשוטה – אני חותך 2 תווים ראשונים ומחפש עליהם קידומות בצורה חד חד ערכית, ואם מדובר ב unique index חיפוש מהיר ביותר שאולי יעשה sequence scan במקום חיפוש באינדקס ויהיה מהיר מאוד.

אבל כאשר חלק מהקידומות הן בעלות 2 תווים, חלק אחר בעלות 3 תווים ואפילו ישנן קידומות בעלות 4 או 6 תווים כאשר התו האחרון הוא זה שמבדיל בין ספקיות שונות יש בעיה.
הרי אין לי ידע מקדים מה הקידומת ומה הוא המספר עצמו.

למזלי יש כלים מאוד חזקים המסייעים בזה עם מסד נתונים PostgreSQL או PG בקיצור.

הדגמה של טבלת קידומות:

create table prefix_providers (
  prefix varchar(15) primary key not null,
  provider_name varchar not null
)

הנה קצת קידומות של ספקיות שהכנתי לצורך ההדגמה:

insert into prefix_providers values
('022', 'Paltal'), ('032', 'Paltal'), ('042', 'Paltal'), 
('082', 'Paltal'), ('092', 'Paltal'), ('0230', 'Hot'), 
('0231', 'Hot'), ('0330', 'Hot'), ('0331', 'Hot'),
('0430', 'Hot'), ('0431', 'Hot'), ('0830', 'Hot'),
('0831', 'Hot'), ('0930', 'Hot'), ('0931', 'Hot'),
('025', 'Bezeq'), ('026', 'Bezeq'), ('027', 'Bezeq'),
('028', 'Bezeq'), ('029', 'Bezeq'), ('039', 'Bezeq');

לא הזנתי את כלל המספרים עבור טלפונים נייחדים וכבר ניתן לראות את הבעיה, נכון?

מה הדרך שהייתם כותבים את השאילתא למצוא את הספק המדויק של מספר הטלפון 03987654321?

הדרך שלי היא לפרק את המחרוזת לסדרה של תווים כאשר כל איבר בסדרה מכיל גם את האיברים הקודמים פלוס עצמו. כלומר 0, 03, 039, 0398 וכו' עד להשארת המספר עצמו.
לאחר מחקר רב, הגעתי לנוסחה הבאה:

ּSELECT ARRAY(SELECT substring('ABCDEF' FROM 1 FOR i)
FROM generate_series(1, GREATEST(length('ABCDEF'))) g(i));

התוצאה היא פשוטה:

            array             
══════════════════════════════
 {A,AB,ABC,ABCD,ABCDE,ABCDEF}

מה זה הקסם הזה?
אתחיל לפתוח סוגריים מבפנים כלפי חוץ לשם ההסבר.
יש שימוש בפונקציה מובנית הקיימת ב PG בשם generate_series.
הפונקציה מאפשרת ליצור טווח (מספרי או תאריכי) מהתחלה מסוימת uעד יעד מסוים וצורת הקפיצה להשיג את היעד הסופי (למשל קפיצה של 25 ספרות).
כך שאם ארצה לקבל בין 0 ל100 את כל המספרים בקפיצה של 25, אכתוב זאת כך:

select generate_series(0, 100, 25);
 generate_series 
═════════════════
               0
              25
              50
              75
             100
(5 rows)

השלב הבא בפירוק המחרוזת הוא לקבל את הערכים לטבלה זמנית בשם "g" עם שדה בשם i.
עכשיו אפשר לחזור ל select הבוחר תתי מחרוזות ולהחזיר תת מחרוזת כאשר כל איטרציה מגדילה את כמות התווים.

אבל יש בעיה – אני מקבל מספר של רשומות (כל תת מחרוזת היא רשומה).
השלב הבא יהיה לכניס את המידע של כל הרשומות למערך:

select ARRAY(select generate_series(0, 100, 25));
      array       
══════════════════
 {0,25,50,75,100}
(1 row)

עכשיו אצור פונקציה בשם prefix על מנת שיהיה קל יותר להשתמש בתוצאה הסופית ולא אהיה צריך לחזור על עצמי כל כך הרבה פעמים:

CREATE OR REPLACE FUNCTION prefixes(varchar) 
   RETURNS varchar[]
   LANGUAGE sql IMMUTABLE
   AS $_$
SELECT ARRAY(SELECT substring($1 FROM 1 FOR i)
 FROM generate_series(1, GREATEST(length($1))) g(i))::varchar[];

את התוצאה השל הפונקציה ניתן להריץ על שאילתא המשתמשת באופרטור השוואה בשם ANY. ערך החזרה שלו הוא חיובי אם לפחות איבר אחד קיים ברשימה בתוך מערך השוואה.

select prefix, prefix=any(prefixes('0334567890'))
from prefix_providers;
  prefix │ ?column? 
════════╪══════════
 022    │ f
 032    │ f
 042    │ f
 082    │ f
 092    │ f
 0230   │ f
 0231   │ f
 0330   │ f
 0331   │ f
 0430   │ f
 0431   │ f
 0830   │ f
 0831   │ f
 0930   │ f
 0931   │ f
 025    │ f
 026    │ f
 027    │ f
 028    │ f
 029    │ f
 035    │ f
 036    │ f
 037    │ f
 038    │ f
 039    │ f
 0398   │ f
(26 rows)

כפי שניתן לראות הכל הוא False כי אמנם יש הרבה רשומות המתחילות ב03 עם עוד ספרה לאחריה, אבל אין קידומת של 03 עם הספרה 3 לאחר מכן (033). אם אוסיף תמיכה גם בקידומת הזו לפחות תשובה אחת תהיה חיובית:

insert into prefix_providers values ('033', 'Bezeq');

select prefix, prefix=any(prefixes('0334567890'))
from prefix_providers;
 prefix │ ?column? 
════════╪══════════
 022    │ f
 032    │ f
 042    │ f
 082    │ f
 092    │ f
 0230   │ f
 0231   │ f
 0330   │ f
 0331   │ f
 0430   │ f
 0431   │ f
 0830   │ f
 0831   │ f
 0930   │ f
 0931   │ f
 025    │ f
 026    │ f
 027    │ f
 028    │ f
 029    │ f
 035    │ f
 036    │ f
 037    │ f
 038    │ f
 039    │ f
 0398   │ f
 033    │ t
(27 rows)

כיצד להשתמש בזה בפועל?

select prefix, provider_name
from prefix_providers
where prefix=any(prefixes('03987654321'));
 prefix │ provider_name 
════════╪═══════════════
 039    │ Bezeq
(1 row)

אבל יש בעיה.
מה קורה כאשר יש לי גם קידומת 0398? התשובה היא שגם הרשומה הזו תחזור:

 prefix │ provider_name 
════════╪═══════════════
 039    │ Bezeq
 0398   │ me
(2 rows)

כאן נכסת תמיכה של פעולת SQL פשוטה שבה אני מחזיר את האיבר הגדול ביותר ורק אותו:

select max(prefix) prefix, provider_name
from prefix_providers
where prefix=any(prefixes('03987654321')) group by prefix
order by prefix desc
limit 1;
 prefix │ provider_name 
════════╪═══════════════
 0398   │ me
(1 row)

ועכשיו אני תמיד אקבל את ה prefix הארוך ביותר שמתאים למספר הטלפון שאני בודק.

09 January, 2022 03:26 PM

24 September, 2021

Lev Meirovitch

What is Ventoy, and why you should always have one!

TL;DR; Before I get to ranting, here is the quick answer: Ventoy is a Free Software multi-platform tool that lets you boot ISO files from a USB drive. Key features that make it different from other tools like Etcher or Unetbootin are: You don’t need to “flash” the ISO to the drive – just copy […]

24 September, 2021 11:20 AM

19 September, 2021

ik

מי הרג את התוכנה שלי?

מזה זמן רב היתה לי בעיה מאוד רצינית עם systemd. יש לי תוכנה שיצרתי אשר לפי ארגומנטים שונים מתנהגת לגמרי שונה בזמן עליה שלה.
למשל התמודדות עם docker, הרצת תהליך לפי כמות תורים (כל תור מקבל תהליך בפני עצמו) ועוד מספר התנהגויות.

כאשר אני רץ ב docker אין בעיה – דוקר מריץ אותי ישיר, אני משתמש במשתני סביבה של דוקר לקבל מידע שאני חייב, אך יש לי בעיה אחרת (שווה פוסט בפני עצמו) – הנחתת ביצועים ברמה מפחידה.

כאשר אני מריץ ידנית את התוכנה, הכל עובד ללא בעיות וההתנהגות היא כמצופה.
אבל כאשר אני מריץ אותה ב systemd, וההגדרות של המערכת היא יצירה של הרבה פרוססים, המערכת נתקעת או מתה מהר מאוד ללא שגיאה כלשהי (לרוב מתה מהר).

מחקר

לקח לי שבועות לבדוק את הקוד, לשנות גישה, לנסות להריץ את המערכת בגישות אחרות, ותמיד רק כאשר זה רק ב systemd התהליכים בעיקר מתים.

התחלתי לשחק קצת עם הגדרות systemd בכיוונים של type ב service שיצרתי, אבל זו לא היתה הבעיה.

התחלתי לחשוב כי אולי מדובר במשתני סביבה, או אפילו limits שונים, אבל הליכה ל pid תחת proc לא הראתה משהו ממש שונה שהרים לי נורה אדומה או שוני הנדרש ממני מעבר להגדרות הסביבה עצמה שהוגדרו.

כאשר הרצתי ידנית – הדבר העיקרי שהיה שונה היו משתני סביבה של חיבור ssh.
חשבתי כי אולי הבעיה היא stdout, אבל גם ככה אני תופס אותו וממיר אותו לקובץ, והוא אפילו כותב בזמן הריצה תחת systemd.

על מנת להבטיח כי זו אינה הבעיה, עשיתי הרצה עם detach ואז התנתקות מה ssh.
חזרתי לשרת אחרי עשר דקות בערך והמערכת עדיין רצה ללא בעיה, למרות שכבר לא היה לה טרמינל, הצלחתי לשלול את זה לגמרי (?).

בנקודה הזו אני כבר חודש (לא קלנדרי או רצוף) חוקר את הבעיה, ומתחיל לחפש באגים ידועים של systemd.
מסתבר אני לא היחיד שמתאר את התופעה, והיו תיקוני באגים שגרמו במקרים שונים להתרסקות של תוכנות, אבל אף אחת לא קשורה לשלי, והגרסה של systemd כבר מכילה את התיקונים לבאגים שמצאתי.

במקרה באחד הבאגים, היתה שאלה אשר ביקשה לקבל מידע על הגדרות בנושא של systemd.kill ושיש לבדוק אותו.

כאשר התחלתי לחפש על הנושא במנוע חיפוש, גיליתי כי מרבית השאילתות במנוע החיפוש היו איך "להרוג" את התוכנה עם systemd ואיך שולחים אותות (סיגנאלים) עם systemd, ופתאום האתר החביב על כולם stack-overflow גילה לי שיש אופציה ששוה לבדוק בשם KillMode (ואתם חשבתם כי דף 3-4 במנוע חיפוש זה מקום שפתרונות באים למות בהם).

חיפוש של systemd.kill עם KillMode הוביל אותי לתוצאות רלוונטיות יותר.

מציאת פיתרון

כאשר נכנסתי ל system.kill, יש הסבר שלדעתי לא מספיק טוב וממצא לאיך systemd מתמודד עם "הרג" של תהליכים בכל מצב.

ההגדרות עצמן יהיו תחת הגדרות ה service, אבל יש תיעוד מיוחד עבור נושאים שונים.
וכאמור, לפחות עבורי, תיעוד הנושא של KillMode אינו מספק על כלל האופציות שיש לו.

מסתבר כי ברירת המחדל היא להרוג "קבוצה" של תהליכים, כלומר התהליך שלי והבנים שלו, גם אם אני הרצתי עם exec ומנותק לגמרי מהבנים, עצם זה שהתהליך הריץ עוד דברים בזמן עליה, תגרום לכך שהיציאה של התהליך (במקרה הזה), תהרוג את הבנים (תודה stack overflow להסבר).

הפיתרון היה לשים

KillMode=process

לא ברור לי כל כך התפקיד של האופציה (מבחינת איך היא באמת עובדת), אבל היא אומרת שבמידה וה"אבא" שוחרר מהעולם, אין לשחרר את הבנים גם כן. וזו "אופציה לא מומלצת" (wwz).

כבר מספר שבועות שהמערכת נשארת באוויר ולא מתה בגלל systemd (אלא באגים שלי שאני מגלה ומתקן תוך כדי, אבל זה התפקיד שלי – ליצור באגים במקומות חדשים).

מבט לאחור

היו לי מספר דברים מאוד מביכים:

  1. לא שמתי לב כי בתחתית התיעוד של כל תיעוד בנושא יש הפניה לעוד נושאים עם קישור.
  2. החיפושים שלי היו שגויים ובדיעבד רק כאשר הבנתי שהמילים שלי היו לא נכונות התחלתי למצוא מידע רלוונטי.
  3. הגעתי למצב "שהסתובבתי סביב הזנב של עצמי" עם הבעיה במקום לשחרר אותה ולחזור בשלבים מאוחרים יותר.

כאשר הצלחתי להבין מה לחפש – המידע נהיה נגיש, אבל אוסף הדברים המביכים למעלה, גרם לכך שזה יקח זמן רב יותר, ולימוד אותי המון.

19 September, 2021 04:28 AM

20 July, 2021

Shlomi Noach

Reducing my OSS involvement, and how it affects orchestrator & gh-ost

I’m going to bring down my work volume around OSS to a minimum, specifically when it comes to orchestrator and gh-ost. This is to explain the whats and hows so that users are as informed as possible. TL;DR a period of time I will not respond to issues, will not review pull requests, will not produce releases, will not answer on mailing lists. That period of time is undefined. Could be as short as a few weeks, could be months, more, an unknown.

The “What”

Both orchestrator and gh-ost are popular tools in the MySQL ecosystem. They enjoy widespread adoption and are known to be used at prominent companies. Time and again I learn of more users of these projects. I used to keep a show-off list, I lost track since.

With wide adoption comes community engagement. This comes in the form of questions (“How do I…”, “Why does this not work…”, “Is it possible to…”), issues (crashing or data integrity bugs, locking issues, performance issues, etc.), suggestions (support this or that) and finally pull requests.

At this time, there’s multiple engagements per day. Between these two projects I estimate more than a full time job addressing those user interactions. That’s a full time job volume on top of an already existing full time job.

Much of this work went on employer’s time, but I have other responsibilities at work, too, and there is no room for a full-time-plus work on these projects. Responding to all community requests is unsustainable and futile. Some issues are left unanswered. Some pull requests are left open.

Even more demanding than time is context. To address a user’s bug report I’d need to re-familiarize myself with 5-year old code. That takes the toll of time but also memory and context switch. As community interaction goes, a simple discussion on an Issue can span multiple days. During those days I’d jump in and out of context. With multiple daily engagements this would mean re-familiarizing myself with different areas of the code, being able to justify a certain behavior; or have good arguments to why we should or should not change it; being able to simulate a scenario in my brain (I don’t have access to users’ environments); comprehend potential scenarios and understand what could break as result of what change — I don’t have and can’t practically have the tests to cover the myriad of scenarios, deployments, software, network and overall infrastructure in all users environments.

Even if I set designated time for community work, this still takes a toll on my daily tasks. The need to have a mental projection in your brain for all that’s open and all that’s to come makes it harder to free my mind and work on a new problem, to really immerse myself in thought, to create something new.

When? For how long?

Effective immediately. I made some promises, and there’s a bunch of open issues and pull requests I intend to pursue, but going forward I’m going to disengage from further questions/requests/suggestions. I’m gonna turn off repo notifications and not get anything in my mailbox.

My intention is to step back, truly disengage, and see what happens. There’s a good chance (this happened before) that after some time I feel the itch to come back to working on these projects. Absolutely no commitments made here.

What does this mean for orchestrator?

After 7 years of maintaining this project, first at Outbrain, then Booking.com, then GitHub and now at PlanetScale, I’m gonna step back and refrain from new developments, from responding to issues, from answering questions, from reviewing pull requests.

I should mention that in the past year or so, I’ve merged more community contributions than my own. That’s staggering! There are very capable contributors to this project.

In essence, the core of orchestrator hasn’t changed in a while. The main logic remains the same. I suspect orchestratorwill remain effective for time to come. I am sure some users will be alarmed at this post, and wonder whether they should keep using orchestrator or search for other solutions. I am in no position to make a suggestion. Users should carefully evaluate what’s in their best interests, what they deem to be stable and reliable software, what they deem to be supported or repairable, etc.

What does this mean for gh-ost?

I co-designed and co-authored gh-ost at GitHub (announcement) as part of the database infrastructure team. We wrote gh-ost to solve a pressing issue of schema changes at GitHub, and were happy to open source it. This led to, frankly, an overwhelming response from the community, with very fast adoption. Within the first few months we received invaluable feedback, bug reports, suggestions, all of which had direct and positive impact to gh-ost.

I’m not working at GitHub anymore, and I’m not an official maintainer of the upstream repo anymore. I do not have the authority to merge PRs or close issues. It is as it should be, the project is owned by GitHub.

I use gh-ost as part of my current job at PlanetScale working on OSS Vitess. Vitess utilizes gh-ost for online DDL. I therefore am an interested party in gh-ost, most specifically to ensure it is correct and sound. For this reason, I selectively engage with users on GitHub’s repo, especially when it comes to issues I consider important for Vitess.

I do maintain a fork, where I either interact with users, or push my own changes. I collaborate with the GitHub team, contribute upstream changes I make on my fork, and pull changes downstream. The GitHub team is kind enough to accept my contributions and invest time in testing and evaluating what might be risky changes. The upstream and downstream code is mostly in sync.

Going forward I will continue to work on things critical to my current job, but otherwise I’ll be stepping away and reduce interactions. This means I will not accept pull requests or answer questions. The upstream gh-ost repo remains under GitHub’s ownership and maintained by GitHub’s engineers. It is not in my authority to say how the upstream project will engage with the community and I do not presume to make suggestions.

On community interaction

I must say that I’m thoroughly humbled and grateful for the interactions on these projects. I hear of other OSS projects suffering abuse, but my work has seen respectful, thoughtful, empowering and inspiring user interactions. The majority of users invest time and thought in articulating an issue, or engage in respectful discussion while suggesting changes. I’ve actually “met” people through these interactions. I can only hope I payed back in same coin.

On community assistance

Community also provides assistance in several forms. The simplest and truly most helpful is by answering questions. Some community members will respond on issues, or on mailing lists, in chat rooms. Some users will identify similar issues to their own, opened by other users, will discuss and help each other, and share information.

Some companies and users are consistent contributors, working on issues that are both specific to their particular needs, as well as ultimately useful for the greater community.

At a previous time where I was overwhelmed with OSS/community work, two prominent companies, let’s call them S and P, stepped forward to offer actual development time; assign their own engineers part-time for a limited period to help pushing forward. I’m forever grateful for their kindness! I didn’t take those offers back then, because I didn’t have a good plan (I still don’t) for coordinating that kind of work; it felt like it would take even more efforts to set it up.

Can we jump in as contributors?

I don’t have a good plan for making this work, or for ensuring that this works well. I prefer that users fork orchestrator, and to not bring in contributors to this repo. If a contributor does have a solid plan, you probably know where to find me.

20 July, 2021 12:14 PM

19 July, 2021

Guy Sheffer

BackupFriend – Self-hosted backup to your RaspberryPi with a history and UI!

BackupFriend logo
Atribution: Icon by: Freepik

Hey all,
I am releasing today something I’ve been working on the past year. It stared with a friend that had a requirement to do off-site backups of his work for his insurance, but BackupFriend has became a full blown backup solution.
The idea is you get a RaspberryPi and plug a harddrive to it, put it at your friends, family or just in your house and backup up to it using a desktop client that should have the feel like Dropbox/Google Drive/etc. You also get history! The RaspberryPi can also be changed to a remote server (instructions here). This guide focuses on self-hosted instructions, because I think its strange all backup solutions out there require you to pay rent for your own data.
Using a 4TB drive for under $100 and a Pi, you can get much more storage which is not ephemeral.
The desktop client has been tested on both Linux, MacOS and Windows.

Also, many thanks to Pull Request Community that featured BackupFriend as a project to work on, that helped get a few PRs on-board.

What you will need

  1. A Raspberry Pi, preferably 4B because of the USB3
  2. A home network with a computer running Linux, MacOS or Windows, which you will be backing up from
  3. An external hard drive that can connect to the Pi (I use a 4TB WD My Passport drive, you can also just use a thumb drive for testing).

How to install on a Pi

  1. Download and the BackupFriend image (source code so you can see what’s under the hood)
  2. Unzip the image and install it to an SD card like any other Raspberry Pi image
  3. Configure your WiFi by editing backupfriendpi-wpa-supplicant.txt at the root of the flashed card when using it like a flash drive (You can also just plug the device to an Ethernet port on your router).
  4. Attach the external drive and power up.
  5. Hostname is backupfriend (not raspberrypi as usual), username: pi and inital password is: raspberry
  6. After a few minutes you should be able to access http://backupfriend/ or http://backupfriend.local.
  7. Default password for the Web UI is admin password admin123.

You should see a login screen like this:

At this point you have the backup server running. Excellent!

The backup server is now sitting on your local network. If you want to have it backing up on a remote location, you will need to open the router port to it, and set the domain name on the nginx-proxy container there. More info on that here.

How to set up the Desktop Client

Now that we have a server on the Pi, let’s backup to it form the local host.

Linux

sudo python3 -m pip install backupfriend

Windows

  1. Download .zip for windows run the executable backupfriend-client.exe.
  2. If you want to make it start on boot follow this guide.

Mac

  1. Download the .zip for mac and open it to extract the .app
  2. Copy it to our applications folder.
  3. If you want to make it start on boot follow this guide (guide would not work if the .app is not in the applications folder).

First Time Run

On the first run you will be asked to follow a wizard and create your connection keys. Those let you backup sequentially to the server. Just follow the guide and copy the public key:

First time run
The SSH public key you need to copy and place in the server

Server setup

Now that we have a key, let’missing apostrophes place it in the server.
Log in to your backup server using the default

user: admin
password: admin123

You should get this view as shown below

Go to admin on the top right and select “Profile”

We need to set up the sync folder and SSH key.

Web interface first login

In the SSH key page press “add new SSH key” and paste the public SSH key you got from the BackupFriend Client:

Adding an SSH key to the webserver

Now there is one more step to do before we can start backing up – setting the root folder for the user.
Click on “Admin area” and then on the “Users: 1” button as shown below:

The admin area page

Select the only admin user in the list and click on the “edit” button. You should see the following edit page.

Here you need to add the “Root directory” to be “/backup”. This means that anything in the “/backup” folder on the Pi would be visible in the web interface.

Edit admin user

Once the changes are saved you will see the amount of free space on the main window:

Main page with free storage shown

Now we can finally sync. The first install comes with an example sync. It just syncs your temp folder. Click the “edit” and then you can confirm that it all works using the “test” button. You should get “connection succeeded”.
Note: Sometimes you might see first “warning: server added to authorized servers”. Just press “Test” again, its the SSH system setting that server as an authorized one.

When the job is running it will turn blue, when it’s finished it will turn green:

Example job running

Once it’s done, or in the middle, you can access the backup on the web interface.

To do so you might need on the first time to refresh the repositories to it will be shown. To do that go to the “profile” and press “refresh repositories”:

Profile page scrolled to the bottom to show “refresh repositories”

Finally, you can see now the repositories and the files with their versions:

Example repository stored

That’s it, you should have now a backup server on a Pi that you can also move elsewhere.

Development – Source Code Repos

There are quite a few parts for the project, here are the repos for them:

This is just version 0.1.0 and there is a lot to improve. Since I am only one person I would greatly appreciate PRs and help getting this to be a full blown solution.

Full text

19 July, 2021 03:02 PM

23 April, 2021

Ilan Shavit

רכישת מחשב חדש, כל מה שצריך לדעת: לוח אם (חלק 4)

מה תפקידו של לוח האם?
לוח האם מחבר בין כל חלקי המחשב, אליו מתחברים הרכיבים ודרכו הם "מדברים".
באיור 1 פירטתי את המחברים השונים שקיימים בלוח אם טיפוסי: ניתן לראות את שקע המעבד, את שקעי הזיכרון (RAM), שקע לכרטיס מסך, שקעי SATA (אליהם מחברים דיסק הקשיח / צורב).
אם אמשיל את המחשב למכונית אז לוח האם מהווה את השלדה של הרכב. כשם שלשלדת רכב מחברים את כל רכיבי המכונית כך ללוח האם מחברים את כל רכיבי המחשב. כשם שבמכונית ספורט עם מנוע פרארי לא תשימו שילדה של פיאט 850 כך גם בלוח האם: אם השקעתם במעבד יקר מן הסתם שתשקיעו גם בלוח אם איכותי (למרות שניתן להרכיב גם לוח אם פשוט).

בוחרים לוח אם מיד לאחר שקונים מעבד. אם קניתם מעבד של Intel תצטרכו לבחור בלוח אם שתומך במעבדי Intel (מהדגם הספציפי שקניתם), כנ"ל אם תקנו מעבד AMD.
אם ברשותכם מעבד ישן רוב הסיכויים שתתקשו למצוא לו לוח אם מתאים (כך שאם ברשותכם לוח מקולקל תתקשו למצוא לו תחליף: תוכלו לרכוש באתרים כגון Ebay, עם כל הסיכון הכרוך בכך, פחות בחנויות מחשבים רגילות)
בלוח האם מיושמת אלקטרוניקה "כבדה" שמאפשרת את עבודת המחשב. האלקטרוניקה הזאת מיושמת באמצעות ערכות שבבים הנקראים Chipset. יש Chipset זולים, שמתאימים למחשבים פשוטים, ויש יקרים יותר.
כל המעבדים החדשים של אינטל (דורות 8 ו- 9) מחייבים שימוש בציפסט מסדרה 300. ניתן לדרג את איכות הציפסט כך:
H310 < B360, B365 < H370 < Z370 < Z390
למה אני מייחס איכות?
  • מספר חריצי הרחבת זכרון (2 או 4)
  • יכולות המהרה
  • איכות כרטיס הקול
  • כמות יציאות USB
  • אפשרות לחבר SSD מסוג M2 ישירות ללוח האם
  • איכות הרכיבים (קבלים בעיקר) ואיכות הבניה כללית
כללי האצבע לבחירת לוח אם:
  • לוח מבוסס ציפסט H310 הוא הלוח הפשוט והזול ביותר. תבחר בו אם בחרת במעבד Intel Pentium
  • תבחר בלוח מבוסס ציפסט B360 או B365 אם בחרת במעבד Intel Core i3
  • תבחר בלוח מבוסס ציפסט H370 אם בחרת במעבד Intel Core i5
  • תבחר בלוח מבוסס ציפסט Z370 אם בחרת במעבד Intel Core i7
  • תבחר בלוח מבוסס ציפסט Z390 אם בחרת במעבד Intel Core i9
    ההיגיון בבחירה הוא זה: אם שילמת 1500 ש"ח על מעבד אז בבקשה אל תקנה לוח אם שעולה 200 ש"ח… זה יעבוד, אבל כדאי מאוד להשקיע יותר ולהתאים את איכות הלוח לאיכות המעבד…
ל- AMD יש כמובן סדרות אחרות של ציפסטים אבל הרעיון דומה…

23 April, 2021 05:43 PM

רכישת מחשב חדש, כל מה שצריך לדעת: זכרון (חלק 3)

אז אחרי שבחרנו מעבד אתמקד הפעם ברכישת זכרון RAM
בטח תשאלו: למה מחשב צריך בכלל זכרון? למה הוא משמש?
הזיכרון הוא אזור העבודה של המעבד. כשאתם טוענים תוכנה (אופיס, מחשבון או כל תוכנה אחרת) התוכנה נטענת מהדיסק הקשיח לתוך אזור מסוים בזיכרון ושם היא רצה. מאחר שהזיכרון מאוד מהיר אז מעבר מתוכנה לתוכנה מתבצע כהרף עין (המעבד רק מדלג בין אזורים שונים בזיכרון). כשאתם מדליקים את המחשב גם מערכת ההפעלה עצמה נטענת לזיכרון ורצה ממנו.

כפי שניתן להבין, לזיכרון תפקיד קריטי בעבודת המחשב. תקלה ברכיב לא תאפשר עבודה שוטפת במחשב (הוא יקרוס, תראו מסכים כחולים והדבר היחידי שניתן יהיה לעשות זה לכבות אותו בכוח)
דרישת המינימום של חלונות 10 היא 2 גיגה בייט (2GB) זכרון.
מה זה גיגה בייט? גיגה זה מיליארד. אז 2 גיגה בייט זה 2 מיליארד תאי זכרון. בדרך כלל רוכשים 4 גיגה בייט זכרון (כשיש מגבלה תקציבית מאוד גדולה), 8, 16 או 32 גיגה בייט (למשתמשים הכבדים ביותר).
באיור 1 ניתן לראות כיצד נראה התקן זכרון של מחשב נייד. זכרון של מחשב נייח נראה דומה (רק הוא קצת יותר ארוך – איור 2).
קניית זכרון הוא תהליך פשוט יחסית. תפעלו לפי הכללים הבא:
1. "כמה שיותר הרי זה משובח…"
2. “קנו תמיד את הדגם האחרון"
היסטוריה: פעם השתמשו בהתקן זכרון שנקרא SDRAM. עם הזמן הוא שודרג ונקרא DDR. השנים חלפו, המהירויות גדלו וככה נוספו ספרות שונות לרכיב: DDR3, DDR2 ועכשיו מוכרים DDR4. אם תקראו את המאמר בעוד מספר שנים בטח יהיה DDR5 או DDR6. אתם תקנו תמיד את הדגם האחרון (DDR4 בזמן כתיבת המאמר).
בסעיף קודם כתבתי לקנות כמה שיותר זכרון אבל בכל זאת לא צריך להשתגע… מס' כללי אצבע לרכישת זכרון:
  • נפח 4GB: כשהתקציב מאוד לוחץ. מתאים לאדם שכל רצונו לגלוש מעת לעת במחשב (בלי הרבה לשוניות פתוחות), לערוך מסמכים ולשחק במשחקים פשוטים
  • נפח 8GB: נפח שמתאים לרוב האוכלוסיה ולרוב השימושים
  • נפח 16GB: מתאים לגיימרים, עורכי וידאו ופוטושופ
  • נפח 32GB: מתאים לגיימרים כבדים ועורכי וידאו מיקצועיים.
הערה:
הזיכרון עליו כתבתי הוא זכרון נדיף. זה אומר שהמידע שעליו נמחק ברגע שאתחלתם או כיביתם את המחשב (מידע קבוע נשמר רק בדיסק הקשיח)

23 April, 2021 05:43 PM

17 March, 2021

Shlomi Noach

The problem with MySQL foreign key constraints in Online Schema Changes

This post explains the inherent problem of running online schema changes in MySQL, on tables participating in a foreign key relationship. We’ll lay some ground rules and facts, sketch a simplified schema, and dive into an online schema change operation.

Our discussion applies to pt-online-schema-change, gh-ost, and Vitess based migrations, or any other online schema change tool that works with a shadow/ghost table like the Facebook tools.

Why Online Schema Change?

Online schema change tools come as workarounds to an old problem: schema migrations in MySQL were blocking, uninterruptible, aggressive in resources, replication unfriendly. Running a straight ALTER TABLE in production means locking your table, generating high load on the primary, causing massive replication lag on replicas once the migration moves down the replication stream.

Isn’t there some Online DDL?

Yes. InnoDB supports Online DDL, where for many ALTER types, your table remains unblocked throughout the migration. That’s an important improvement, but unfortunately not enough. Some migration types do not permit concurrent DDL (notably changing column data type, e.g. from INT to BIGINT). Migration is still aggressive and generates high load on your server. Replicas still run the migration sequentially. If your migration takes 5 hours to run concurrently on the primary, expect a 5 hour replication lag on your replica, i.e. complete loss of your fresh read capacity.

Isn’t there some Instant DDL?

Yes. But unfortunately extremely limited. Mostly just for adding a new column. See here or again here. Instant DDLs showed great promise when introduced (contributed to MySQL by Tencent Games DBA Team) three years ago, and the hope was that MySQL would support many more types of ALTER TABLE in INSTANT DDL. At this time this has not happened yet, and we do with what we have.

Not everyone is Google or Facebook scale, right?

True. But you don’t need to to be Google, or Facebook, or GitHub etc. scale to feel the pain of schema changes. Any non trivially sized table takes time to ALTER, which results with lock/downtime. If your tables are limited to hundreds or mere thousands of small rows, you can get away with it. When your table grows, and a mere dozens of MB of data is enough, ALTER becomes non-trivial at best case, and outright a cause of outage in a common scenario, in my experience.

Let’s discuss foreign key constraints

In the relational model tables have relationships. A column in one table indicates a column in another table, so that a row in one table has a relationship one or more rows in another table. That’s the “foreign key”. A foreign key constraint is the enforcement of that relationship. A foreign key constraint is a database construct which watches over rows in different tables and ensures the relationship does not break. For example, it may prevent me from deleting a row that is in a relationship, to prevent the related row(s) from becoming orphaned.

Is this a biased post? We hear you don’t like foreign keys

No, this is a technical discussion (we’re getting there, I promise). But, for context:

I’ve been working on and around schema migration for many years now, and my current work on Vitess introduces some outrageous new super powers for schema migrations, which I can’t wait to present (and if you can’t wait, either, feel free to browse the public PRs, it’s free and open source).

Every once in a while, this pops up, on twitter, on Hacker News, on internal discussions. And the question gets asked: why can’t we support foreign keys?

And so this post explains why, technically, there’s an inherent problem in supporting foreign keys in Online Schema Changes. This is not about opinions for or against foreign keys.

Wait! pt-online-schema-change does support foreign keys! There’s command line flags for that!

Yes, no. Not quite, and I’ll elaborate as we dive into the details. And, to clarify, pt-online-schema-change attempts to make the best of the situation. Back when developing gh-ost, we saw that as a non-feasible solution. pt-online-schema-change does a good job at explaining the restrictions and limitations of its foreign key support, and we will cover these and beyond, here.

OK, let’s dive in.

We begin, let’s first present a model

Consider the following extremely simplified model. Don’t judge me on the oversimplification, we just want to address the foreign keys issue here.

[code lang=sql]
CREATE TABLE country (
id INT NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);

CREATE TABLE person (
id INT NOT NULL,
country_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(id),
KEY country_idx (country_id),
CONSTRAINT person_country_fk FOREIGN KEY (country_id) REFERENCES country(id) ON DELETE NO ACTION
);

CREATE TABLE company (
id INT NOT NULL,
country_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(id),
KEY country_idx (country_id),
CONSTRAINT company_country_fk FOREIGN KEY (country_id) REFERENCES country(id) ON DELETE NO ACTION
);
[/code]

Some analysis, rules and facts

Changing a child table

Say we want to ALTER TABLE person MODIFY name VARCHAR(1024) NOT NULL CHARSET utf8mb4. Or add a column. Or an index. Whichever. Let’s see what happens.

person has a foreign key. We therefore create the ghost table with similar foreign key, a child table that references the parent country table. Funnily, even though InnoDB’s foreign keys live inside a table scope, their names are globally unique. So we create the ghost table as follows:

[code lang=sql]
CREATE TABLE _person_ghost (
id INT NOT NULL,
country_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY(id),
KEY country_idx (country_id),
CONSTRAINT person_country_fk2 FOREIGN KEY (country_id) REFERENCES country(id) ON DELETE NO ACTION
);

[/code]

ERROR!

What have ended up with? Take a look:

The table person_OLD still exists, and maintains a foreign key constraint on country. Now, suppose we want to delete country number 99. We delete or update all rows in person which point to country 99. Good. We proceed to DELETE FROM country WHERE id=99. We can’t. That’s because person_OLD still has rows where country_id=99.

Well, why don’t you just drop that old constraint?

To drop the foreign key constraint from person_old is to ALTER TABLE person_old DROP FOREIGN KEY person_country_fk. What’s that? An ALTER TABLE? Wasn’t that the thing we wanted to avoid in the first place? There was a reason we ran an online schema change! So that’s an absolute no go.

Well, why don’t you just drop the old table?

pt-online-schema-change offers --alter-foreign-keys-method drop_swap: to get rid of the foreign key we can drop the old table. The logic it offers is:

  1. Before we cut-over
  2. Disable foreign key checks
  3. DROP the original table (e.g. person)
  4. RENAME the ghost table in its place

Problem: DROP

Alas, more turtles. Dropping a MySQL table is production is a cause for outage. Here’s a lengthy discussion form the gh-ost repo. Digging my notes shows this post from 2010. This is an ancient problem where dropping a table places locks on buffer pool and on adaptive hash index, and there’s been multiple attempts to work around it. See Vitess’s table lifecycle for more.

Just a couple months ago, MySQL 8.0.23 release notes indicate that this bug is finally solved. I can’t wait to try it out. Most of the world is not on 8.0.23 yet and until it is, DROP is a problem.

In my personal experience, if you can’t afford to run a straight ALTER on a table, it’s likely you can’t afford to DROP it.

Problem: outage

As pt-online-schema-change documentation correctly point out, we cause a brief time of outage after we DROP the person table, and before we RENAME TABLE _person_ghost TO person. This is unfortunate, but, assuming DROP is instantaneous, is indeed brief.

Child-side: summary

Assuming MySQL 8.0.23 with instantaneous DROP, altering a table with child-side-only constraint is feasible. Without instantaneous DROP, the migration can be as blocking as a straight ALTER.

I regret to inform that from here things only get worse.

Changing a parent table

What happens if we naively try to ALTER TABLE country ADD COLUMN currency VARCHAR(16) NOT NULL?

We create a ghost table, we populate the ghost table, we cut-over, and… End up with:

Our naive approach fails miserably. As we RENAME TABLE country to country_OLD, the children’s foreign keys, on person and company, followed the table entity into country_OLD. We are now in a situation where there is no active constraint on country, and we’re stuck with a legacy table that affects our production.

Just drop the old table?

Other than the DROP issue discussed above, this doesn’t solve the main problem, which is that we are left with no constraint on country.

ALTER on parent implies ALTER on children

The shocking result of our naive experiment, is that if we want to ALTER TABLE country, we must – concurrently somehow – also ALTER TABLE person and – concurrently somehow – ALTER TABLE company. On the children tables we need to DROP the old foreign key, and create a new foreign key that points into country_ghost.

That’s a lot to unpack.

How does pt-online-schema-change solve this?

pt-online-schema-change offers --alter-foreign-keys-method rebuild_constraints. In this method, just before we cut-over and RENAME the tables, we iterate all children, and , one by one, run a straight ALTER TABLE on each of the children to DROP the old constraint and to ADD the new constraint, pointing to country_ghost (imminently? to be renamed to country).

This must happen when the ghost table is in full sync with the original table, or else there can be violations. For pt-online-schema-change, which uses synchronous in-transaction trigger propagation, this works. For gh-ost, Vitess etc., which use the asynchronous approach, this can only take place while we place a write lock on the original table.

As pt-online-schema-change documentation correctly indicates, this makes sense only when the children are all very small tables.

This gets worse. Let’s break this down even more.

Straight ALTER on children, best case scenario?

Best case is achieved when indeed all children tables are very small. Still, we need to place a lock, and either sequentially or concurrently ALTER multiple such small tables.

In my experience, on databases that aren’t trivially small, the opposite is more common: children tables are much larger than parent tables, and running a straight ALTER on children is just not feasible.

Straight ALTER on children, failures?

Even the best case scenario poses the complexity of recovering/rolling back from error. For example, in a normal online schema change, we set timeouts for DDLs. Like the final RENAME. If something doesn’t work out, we timeout the DDL, take a step back, and try cutting-over again later on. But our situation is much more complex now. While we keep a write lock, we must run multiple DDLs on the children, repointing their foreign keys from the original country table to country_ghost. What if one of those DDLs fail? We are left in a limbo state. Some of the DDLs may have succeeded. We’d need to either revert them, introducing even more DDLs (remember, we’re still holding locks), or retry that failing DDL. Those are a lot of DDLs to synchronize at the same time, even when they’re at all feasible.

If children tables are large?

In our scenario, person and company are large tables. A straight ALTER table is just not feasible. We began this discussion assuming there’s a problem with ALTER in the first place.

Also, for asynchronous online schema changes the situation is much more complex since we need to place more locks.

So, let’s ALTER the children with Online Schema Change?

There’s an alluring thought. We bite, and illustrate what it would take to run an online schema change on each of the large children, concurrently to, and coordinated with, an online schema change on the parent.

When can we start OSC on children?

We want the children to point their FK to country_ghost. So we must kick the migration on each child after the parent’s migration creates the ghost table, and certainly before cut-over.

Initially, the parent’s ghost table is empty, or barely populated. Isn’t that a problem? Pointing to a parent table which is not even populated? Fortunately for us, we again remember we can disable foreign key checks as our OSC tool populates the child table. Sure, everything is broken at first, but we promise the server and the user that we will figure it all out at cut-over time.

So far, looks like we have a plan. We need to catch that notification that country_ghost table is created, and we kick an online migration on person and on company.

When do we cut-over each migration?

We absolutely can’t cut-over country before person and company are complete. That’s why we embarked on altering the children in the first place. We must have the children’s foreign keys point to country_ghost before cutting it over.

But now, we need to also consider: when is it safe to cut-over person and company? It is only safe to cut-over when referential integrity is guaranteed. We remember that throughout the parent’s migration there’s no such guarantee. surely not while the table gets populated. And for asynchronous-based migrations, even after that, because the ghost table always “lags” a bit behind the original table.

The only way to provide referential integrity guarantee for asynchronous based migrations is when we place a write lock on the parent table (country). We bite. We lock the table for writes, and sync up country_ghost until we’re satisfied both are in complete sync. Now’s logically a safe time to cut-over the children.

But notice: this is a single, unique time, where we must cut-over all children, or none. This gets worse.

Best case scenario for cutting-over

In the best scenario, we place a lock on country, sync up country_ghost, hold the lock, then iterate all children, and cut-over each. All children operations are successful. We cut-over the parent.

But this best case scenario depends on getting the best case scenario on each of the children, to its own. Remember, an ALTER on a child table means we have to DROP the child’s old table. Recall the impact it has in production. Now multiply by n children. The ALTER on country, and while holding a write lock,  will need to sustain survive DROP on both person_OLD and company_OLD. This ie best case.

Less than best case scenario is a disaster

We don’t have the room for problems. Suppose person cuts over, and we DROP person_OLD. But then company fails to cut-over. There’s DDL timeout.

We can’t roll back. person is now committed to company_ghost. We can try cutting over company again, and again, and again. But we may not fail. During these recurring attempts we must keep the lock on country. And try again company. Did it succeed? Phew. We can cut-over country and finally remove the lock.

But what if something really fails? Pro tip: it most certainly happens.

If person made it, and company does not – if company‘s migration breaks, fails, panics, gets killed, goes into seemingly infinite deadlocks, is unable to cut-over — whichever — we’re left in inconsistent and impossible scenario. person is committed to company_ghost, but company is still committed to country. We have to keep that lock on country and run a new migration on company! and again, and again. Meanwhile, country is locked. Oh yes, meanwhile person is also locked. You can’t write to person because you can’t verify that related rows exist in country, because country has a WRITE lock.

I can’t stress this enough: the lock must not be released until all children tables are migrated. So, for our next turtle, what happens on a failover? We get referential integrity corruption, because locks don’t work across servers.

Disk space

Remember that an OSC works by creating a ghost table and populating it until it is in sync with the original table. This effectively means requiring extra disk space at roughly the same volume as the original table.

In a perfect world, we’d have all the disk space we ever needed. In my experience we’re far from living in a perfect world. I’ve had migrations where we weren’t sure we had the disk space for a single table change.

If we are to ALTER a parent, and as by product ALTER all of its children, at the same time, we’d need enough free disk space for all volumes of affected tables, combined.

In fact, running out of disk space is one of the common reasons for failing an online schema change operation. Consider how low the tolerance is for parent-side schema migration errors. Consider that running out of disk space isn’t something that just gets solved by retrying the cut-over again, and again, … the disk space is not there.

Run time

Three migrations running concurrently will not run faster than three migrations running sequentially — that’s my experience backed with production experiments. In my experience they actually end up taking longer because they’re all fighting for same resources, and context switch matters, as back-off intervals pile up. Maybe there’s some scenario where they could run slightly faster?

Altering our 200 row country  table ends up taking hours and hours due to the large person and country tables. The time for a migration is roughly the sum of times for all dependent migrations!

Hmmm. Maybe on country we should just run a straight ALTER. I think so, that wins! But it only wins our particular scenario, as we see next.

Parent-side: summary

The operational complexity of Online Schema Changes for parent-side foreign keys is IMO not feasible. We need to assume all child-side operations are feasible, first (I’m looking at you, DROP TABLE), and we have almost zero tolerance to things going wrong. Coordinating multiple migrations is complex, and a failover at the wrong time may cause corruption

Changing a deep nested relationship

Truly, everything discussed thus far was a simplified situation. We introduce more turtles to our story. Let’s add this table:

[code lang=sql]
CREATE TABLE person_company (
id INT NOT NULL AUTO_INCREMENT,
person_id INT NOT NULL,
company_id INT NOT NULL,
start_at TIMESTAMP NOT NULL,
end_at TIMESTAMP NULL,
PRIMARY KEY(id),
KEY person_idx (person_id),
KEY company_idx (company_id),
CONSTRAINT person_company_person_fk FOREIGN KEY (person_id) REFERENCES person(id) ON DELETE NO ACTION,
CONSTRAINT person_company_company_fk FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE NO ACTION
);
[/code]

person_company is a child of person and of company. It’s actually enough that it’s a child of one of them. What’s important is that now person is both a child table and a parent table. So is company. This is a pretty common scenario in schema designs.

How do you ALTER a table that is both a parent and a child?

We introduce no new logic here, we “just” have to combine the logic for both. Given person_company exists, if we wanted to ALTER TABLE person we’d need to:

So how do we alter country now?

To ALTER TABLE country, we’d need to:

And we have near zero tolerance to any failure in the above, and we can’t afford a failover during that time…

Overall summary

It would all be better if we could just run ALTER TABLE in MySQL and have it truly online, throttling, and on replicas, too. This doesn’t exists and our alternative is mostly Online Schema change tools, where, IMO, handing foreign key constraints on large tables is not feasible.

There’s an alternative to Online Schema change, which is to ALTER on replicas. That comes with its own set of problems, and for this blog post I just ran out of fumes. For another time!

17 March, 2021 03:21 PM

07 March, 2021

Lev Meirovitch

How “undefined” is undefined behavior?

I was browsing StackOverflow yesterday, and encountered an interesting question.Unfortunately, that question was closed almost immediately, with comments stating: “this is undefined behavior” as if there was no explanation to what was happening. But here is the twist: the author of the question knew already it was “undefined behavior”, but he was getting consistent results, […]

07 March, 2021 12:45 AM

20 February, 2021

Amir Aharoni

Amir Aharoni’s Quasi-Pro Tips for Translating the Software That Powers Wikipedia, 2020 Edition

This is a new version of a post that was originally published in 2015. Much of it is the same, but there are several updates that justified publishing a new version.

Introduction

As you probably already know, Wikipedia is a website. A website has two components: the content and the user interface. The content of Wikipedia is the articles, as well as various discussion and help pages. The user interface is the menus around the articles and the various screens that let editors edit the articles and communicate to each other.

Another thing that you probably already know is that Wikipedia is massively multilingual, so both the content and the user interface must be translated.

Translation of articles is a topic for another post. This post is about getting all the user interface translated to your language, and doing it as quickly, easily, and efficiently as possible.

The most important piece of software that powers Wikipedia and its sister projects is called MediaWiki. As of today, there are more than 3,800 messages to translate in MediaWiki, and the number grows frequently. “Messages” in the MediaWiki jargon are strings that are shown in the user interface. Every message can and should be translated.

In addition to core MediaWiki, Wikipedia also uses many MediaWiki extensions. Some of them are very important because they are frequently seen by a lot of readers and editors. For example, these are extensions for displaying citations and mathematical formulas, uploading files, receiving notifications, mobile browsing, different editing environments, etc. There are more than 5,000 messages to translate in the main extensions, and over 18,000 messages to translate if you want to have all the extensions translated, including the most technical ones. There are also the Wikipedia mobile apps and additional tools for making automated edits (bots) and monitoring vandalism, with several hundreds of messages each.

Translating all of it probably sounds like an impossibly enormous job. It indeed takes time and effort, but the good news are that there are languages into which all of this was translated completely, and it can also be completely translated into yours. You can do it. In this post I’ll show you how.

A personal story

In early 2011 I completed the translation of all the messages that are needed for Wikipedia and projects related to it into Hebrew. All. The total, complete, no-excuses, premium Wikipedia experience, in Hebrew. Every single part of the MediaWiki software, extensions and additional tools was translated to Hebrew. Since then, if you can read Hebrew, you don’t need to know a single English word to use it.

I didn’t do it alone, of course. There were plenty of other people who did this before I joined the effort, and plenty of others who helped along the way: Rotem Dan, Ofra Hod, Yaron Shahrabani, Rotem Liss, Or Shapiro, Shani Evenshtein, Dagesh Hazak, Guycn2 and Inkbug (I don’t know the real names of the last three), and many others. But back then in 2011 it was I who made a conscious effort to get to 100%. It took me quite a few weeks, but I made it.

However, the software that powers Wikipedia changes every single day. So the day after the translations statistics got to 100%, they went down to 99%, because new messages to translate were added. But there were just a few of them, and it took me only a few minutes to translate them and get back to 100%.

I’ve been doing this almost every day since then, keeping Hebrew at 100%. Sometimes it slips because I am traveling or because I am ill. It slipped for quite a few months in 2014 because my first child was born and a lot of new messages happened to be added at about the same time, but Hebrew got back to 100%. It happened again in 2018 for the same happy reason, and went back to 100% after a few months. And I keep doing this.

With the sincere hope that this will be useful for helping you translate the software that powers Wikipedia completely to your language, let me tell you how.

Preparation

First, let’s do some work to set you up.

If you haven’t already, create a translatewiki.net account at the translatewiki.net main page. First, select the languages you know by clicking the “Choose another language” button (if the language into which you want to translate doesn’t appear in the list, choose some other language you know, or contact me). After selecting your language, enter your account details. This account is separate from your Wikipedia account, so if you already have a Wikipedia account, you need to create a new one. It may be a good idea to give it the same username.

After creating the account you have to make several test translations to get full translator permissions. This may take a few hours. Everybody except vandals and spammers gets full translator permissions, so if for some reason you aren’t getting them or if it appears to take too much time, please contact me.

Make sure you know your ISO 639 language code. You can easily find it on Wikipedia.

Go to your preferences, to the Editing tab, and add languages that you know to Assistant languages. For example, if you speak one of the native languages of South America like Aymara (ay) or Quechua (qu), then you probably also know Spanish (es) or Portuguese (pt), and if you speak one of the languages of Indonesia like Javanese (jv) or Balinese (ban), then you probably also know Indonesian (id). When available, translations to these languages will be shown in addition to English.

Familiarize yourself with the Support page and with the general localization guidelines for MediaWiki.

Add yourself to the portal for your language. The page name is Portal:Xyz, where Xyz is your language code.

Priorities, part 1

The translatewiki.net website hosts many projects to translate beyond stuff related to Wikipedia. It hosts such respectable Free Software projects as OpenStreetMap, Etherpad, MathJax, Blockly, and others. Also, not all the MediaWiki extensions are used on Wikimedia projects. There are plenty of extensions, with thousands of translatable messages, that are not used by Wikimedia, but only on other sites, but they use translatewiki.net as the platform for translation of their user interface.

It would be nice to translate all of it, but because I don’t have time for that, I have to prioritize.

On my translatewiki.net user page I have a list of direct links to the translation interface of the projects that are the most important:

I usually don’t work on translating other projects unless all the above projects are 100% translated to Hebrew. I occasionally make an exception for OpenStreetMap or Etherpad, but only if there’s little to translate there and the untranslated MediaWiki-related projects are not very important.

Priorities, part 2

So how can you know what is important among more than 18,000 messages from the Wikimedia universe?

Start from MediaWiki most important messages. If your language is not at 100% in this list, it absolutely must be. This list is automatically created periodically by counting which 600 or so messages are actually shown most frequently to Wikipedia users. This list includes messages from MediaWiki core and a bunch of extensions, so when you’re done with it, you’ll see that the statistics for several groups improved by themselves.

Now, if the translation of MediaWiki core to your language is not yet at 18%, get it there. Why 18%? Because that’s the threshold for exporting your language to the source code. This is essential for making it possible to use your language in your Wikipedia (or Incubator). It will be quite easy to find short and simple messages to translate (of course, you still have to do it carefully and correctly).

Some technical notes

Have you read the general localization guide for Mediawiki? Read it again, and make sure you understand it. If you don’t, ask for help! The most important section, especially for new translators, is “Translation notes”.

A super-brief list of things that you should know:

Learn to use the project selector at the top of the translation interface. Projects are also known as “Message groups”. For example, each extension is a message group, and some larger extension, such as Visual Editor, are further divided into several smaller message groups. Using the selector is very simple: Just click “All” next to “Message group”, and use the search box to find the component that you want to translate, such as “Visual Editor” or “Wikibase”. Clicking on a message group will load the untranslated messages for that group.

The “Extensions used by Wikimedia” group is divided into several more subgroups. The important one is “Extensions used by Wikimedia – Main”, which includes the most commonly used extensions. Other subgroups are:

There is also a group called “EXIF Tags”. It’s an advanced part of core MediaWiki. It mostly includes advanced photography terminology, and it shows information about photographs on Wikimedia Commons. If you are not sure how to translate these messages, ask a professional photographer. In any case, it’s OK to do it later, after you completed more important components.

Getting things done, one by one

Once you have the most important MediaWiki messages 100% and at least 18% of MediaWiki core is translated to your language, where do you go next?

I have surprising advice.

You need to get everything to 100% eventually. There are several ways to get there. Your mileage may vary, but I’m going to suggest the way that worked for me: Complete the easiest piece that will get your language closer to 100%! For me this is an easy way to remove an item off my list and feel that I accomplished something.

But still, there are so many items at which you could start looking! So here’s my selection of components that are more user-visible and less technical. The list is ordered not by importance, but by the number of messages to translate (as of October 2020):

I put MediaWiki core last intentionally. It’s a very large message group, with over 3000 messages. It’s hard to get it completed quickly, and actually, some of its features are not seen very frequently by users who aren’t site administrators or very advanced editors. By all means, do complete it, try to do it as early as possible, and get your friends to help you, but it’s also OK if it takes some time.

Getting all the things done

OK, so if you translate all the items above, you’ll make Wikipedia in your language mostly usable for most readers and editors. But let’s go further.

Let’s go further not just for the sake of seeing pure 100% in the statistics everywhere. There’s more.

As I wrote above, the software changes every single day. So do the translatable messages. You need to get your language to 100% not just once; you need to keep doing it continuously.

Once you make the effort of getting to 100%, it will be much easier to keep it there. This means translating some things that are used rarely (but used nevertheless; otherwise they’d be removed). This means investing a few more days or weeks into translating-translating-translating.

You’ll be able to congratulate yourself not only upon the big accomplishment of getting everything to 100%, but also upon the accomplishments along the way.

One strategy to accomplish this is translating extension by extension. This means, going to your translatewiki.net language statistics: here’s an example with Albanian, but choose your own language. Click “expand” on MediaWiki, then again “expand” on “MediaWiki Extensions” (this may take a few seconds—there are lots of them!), then on “Extensions used by Wikimedia” and finally, on “Extensions used by Wikimedia – Main”. Similarly to what I described above, find the smaller extensions first and translate them. Once you’re done with all the Main extensions, do all the extensions used by Wikimedia. This strategy can work well if you have several people translating to your language, because it’s easy to divide work by topic. (Going to all extensions, beyond Extensions used by Wikimedia, helps users of these extensions, but doesn’t help Wikipedia very much.)

Another fun strategy is quiet and friendly competition with other languages. Open the statistics for Extensions Used by Wikimedia – Main and sort the table by the “Completion” column. Find your language. Now translate as many messages as needed to pass the language above you in the list. Then translate as many messages as needed to pass the next language above you in the list. Repeat until you get to 100%.

For example, here’s an excerpt from the statistics for today:

Let’s say that you are translating to Georgian. You only need to translate 37 messages to pass Marathi and go up a notch (2555 – 2519 + 1 = 37). Then 56 messages more to pass Hindi and go up one more notch (2518 – 2463 + 1 = 56). And so on.

Once you’re done, you will have translated over 5600 messages, but it’s much easier to do it in small steps.

Once you get to 100% in the main extensions, do the same with all the Extensions Used by Wikimedia. It’s way over 10,000 messages, but the same strategies work.

Good stuff to do along the way

Invite your friends! You don’t have to do it alone. Friends will help you work more quickly and find translations to difficult words.

Never assume that the English message is perfect. Never. Do what you can to improve the English messages. Developers are people just like you are. There are developers who know their code very well, but who are not the best writers. And though some messages are written by professional user experience designers, many are written by the developers themselves. Developers are developers; they are not necessarily very good writers or designers, and the messages that they write in English may not be perfect. Also, keep in mind that many, many MediaWiki developers are not native English speakers; a lot of them are from Russia, Netherlands, India, Spain, Germany, Norway, China, France and many other countries. English is foreign to them, and they may make mistakes.

So if anything is hard to translate, of if there are any other problems with the English messages to the translatewiki Support page. While you are there, use the opportunity to help other translators who are asking questions there, if you can.

Another good thing is to do your best to try using the software that you are translating. If there are thousands of messages that are not translated to your language, then chances are that it’s already deployed in Wikipedia and you can try it. Actually trying to use it will help you translate it better.

Whenever relevant, fix the documentation displayed near the translation area. Strange as it may sound, it is possible that you understand the message better than the developer who wrote it!

Before translating a component, review the messages that were already translated. To do this, click the “All” tab at the top of the translation area. It’s useful for learning the current terminology, and you can also improve them and make them more consistent.

After you gain some experience, create or improve a localization guide in your language. There are very few of them at the moment, and there should be more. Here’s the localization guide for French, for example. Create your own with the title “Localisation guidelines/xyz” where “xyz” is your language code.

As in Wikipedia itself, Be Bold.

OK, so I got to 100%, what now?

Well done and congratulations.

Now check the statistics for your language every day. I can’t emphasize enough how important it is to do this every day. If not every day, then as frequently as you can.

The way I do this is having a list of links on my translatewiki.net user page. I click them every day, and if there’s anything new to translate, I immediately translate it. Usually there are just a few new messages to translate; I didn’t measure precisely, but usually it’s fewer than 20. Quite often you won’t have to translate from scratch, but to update the translation of a message that changed in English, which is usually even faster.

But what if you suddenly see 200 new messages to translate or more? It happens occasionally. Maybe several times a year, when a major new feature is added or an existing feature is changed. Basically, handle it the same way you got to 100% before: step by step, part by part, day by day, week by week, notch by notch, and get back to 100%.

But you can also try to anticipate it. Follow the discussions about new features, check out new extensions that appear before they are added to the Extensions Used by Wikimedia group, consider translating them when you have a few spare minutes. At the worst case, they will never be used by Wikimedia, but they may be used by somebody else who speaks your language, and your translations will definitely feed the translation memory database that helps you and other people translate more efficiently and easily.

Consider also translating other useful projects: OpenStreetMap, Etherpad, Blockly, Encyclopedia of Life, etc. Up to you. The same techniques apply everywhere.

What do I get for doing all this work?

The knowledge that thanks to you, people who read in your language can use Wikipedia without having to learn English. Awesome, isn’t it? Some people call it “Good karma”. Also, the knowledge that you are responsible for creating and spreading the terminology in your language for one of the most important and popular websites in the world.

Oh, and you also get enormous experience with software localization, which is a rather useful and demanded job skill these days.

Is there any other way in which I can help?

Yes!

If you find this post useful, please translate it to other languages and publish it in your blog. No copyright restrictions, public domain (but it would be nice if you credit me and send me a link to your translation). Make any adaptations you need for your language. It took me years of experience to learn all of this, and it took me about four hours to write it. Translating it will take you much less than four hours, and it will help people be more efficient translators.

Thanks!

20 February, 2021 05:19 PM

23 October, 2020

Amir Aharoni

Amir Aharoni’s Quasi-Pro Tips for Translating the Software That Powers Wikipedia

This post is outdated. For a newer version see Amir Aharoni’s Quasi-Pro Tips for Translating the Software That Powers Wikipedia, 2020 Edition


As you probably already know, Wikipedia is a website. A website has content—the articles; and it has user interface—the menus around the articles and the various screens that let editors edit the articles and communicate to each other.

Another thing that you probably already know is that Wikipedia is massively multilingual, so both the content and the user interface must be translated.

Translation of articles is a topic for another post. This post is about getting all of the user interface translated to your language, as quickly and efficiently as possible.

The most important piece of software that powers Wikipedia and its sister projects is called MediaWiki. As of today, there are 3,335 messages to translate in MediaWiki, and the number grows frequently. “Messages” in the MediaWiki jargon are strings that are shown in the user interface, and that can be translated. In addition to core MediaWiki, Wikipedia also has dozens of MediaWiki extensions installed, some of them very important—extensions for displaying citations and mathematical formulas, uploading files, receiving notifications, mobile browsing, different editing environments, etc. There are around 3,500 messages to translate in the main extensions, and over 10,000 messages to translate if you want to have all the extensions translated. There are also the Wikipedia mobile apps and additional tools for making automated edits (bots) and monitoring vandalism, with several hundreds of messages each.

Translating all of it probably sounds like an enormous job, and yes, it takes time, but it’s doable.

In February 2011 or so—sorry, I don’t remember the exact date—I completed the translation into Hebrew of all of the messages that are needed for Wikipedia and projects related to it. All. The total, complete, no-excuses, premium Wikipedia experience, in Hebrew. Every single part of the MediaWiki software, extensions and additional tools was translated to Hebrew, and if you were a Hebrew speaker, you didn’t need to know a single English word to use it.

I wasn’t the only one who did this of course. There were plenty of other people who did this before I joined the effort, and plenty of others who helped along the way: Rotem Dan, Ofra Hod, Yaron Shahrabani, Rotem Liss, Or Shapiro, Shani Evenshtein, Inkbug (whose real name I don’t know), and many others. But back then in 2011 it was I who made a conscious effort to get to 100%. It took me quite a few weeks, but I made it.

Of course, the software that powers Wikipedia changes every single day. So the day after the translations statistics got to 100%, they went down to 99%, because new messages to translate were added. But there were just a few of them, and it took me a few minutes to translate them and get back to 100%.

I’ve been doing this almost every day since then, keeping Hebrew at 100%. Sometimes it slips because I am traveling or I am ill. It slipped for quite a few months because in late 2014 I became a father, and a lot of new messages happened to be added at the same time, but Hebrew is back at 100% now. And I keep doing this.

With the sincere hope that this will be useful for translating the software behind Wikipedia to your language, let me tell you how.

Preparation

First, let’s do some work to set you up.

Priorities, part 1

The translatewiki.net website hosts many projects to translate beyond stuff related to Wikipedia. It hosts such respectable Free Software projects as OpenStreetMap, Etherpad, MathJax, Blockly, and others. Also, not all the MediaWiki extensions are used on Wikimedia projects; there are plenty of extensions, with thousands of translatable messages, that are not used by Wikimedia, but only on other sites, but they use translatewiki.net as the platform for translation of their user interface.

It would be nice to translate all of it, but because I don’t have time for that, I have to prioritize.

On my translatewiki.net user page I have a list of direct links to the translation interface of the projects that are the most important:

I usually don’t work on translating other projects unless all of the above projects are 100% translated to Hebrew. I occasionally make an exception for OpenStreetMap or Etherpad, but only if there’s little to translate there and the untranslated MediaWiki-related projects are not very important.

Priorities, part 2

So how can you know what is important among more than 15,000 messages from the Wikimedia universe?

Start from MediaWiki most important messages. If your language is not at 100% in this list, it absolutely must be. This list is automatically created periodically by counting which 600 or so messages are actually shown most frequently to Wikipedia users. This list includes messages from MediaWiki core and a bunch of extensions, so when you’re done with it, you’ll see that the statistics for several groups improved by themselves.

Now, if the translation of MediaWiki core to your language is not yet at 18%, get it there. Why 18%? Because that’s the threshold for exporting your language to the source code. This is essential for making it possible to use your language in your Wikipedia (or Incubator). It will be quite easy to find short and simple messages to translate (of course, you still have to do it carefully and correctly).

Getting Things Done, One by One

Once you have the most important MediaWiki messages 100% and at least 18% of MediaWiki core is translated to your language, where do you go next?

I have surprising advice.

You need to get everything to 100% eventually. There are several ways to get there. Your mileage may vary, but I’m going to suggest the way that worked for me: Complete the easiest piece that will get your language closer to 100%! For me this is an easy way to strike an item off my list and feel that I accomplished something.

But still, there are so many items at which you could start looking! So here’s my selection of components that are more user-visible and less technical, sorted not by importance, but by the number of messages to translate:

I put MediaWiki core last intentionally. It’s a very large message group, with over 3000 messages. It’s hard to get it completed quickly, and to be honest, some of its features are not seen very frequently by users who aren’t site administrators or very advanced editors. By all means, do complete it, try to do it as early as possible, and get your friends to help you, but it’s also OK if it takes some time.

Getting All Things Done

OK, so if you translate all the items above, you’ll make Wikipedia in your language mostly usable for most readers and editors.

But let’s go further.

Let’s go further not just for the sake of seeing pure 100% in the statistics everywhere. There’s more.

As I wrote above, the software changes every single day. So do the translatable messages. You need to get your language to 100% not just once; you need to keep doing it continuously.

Once you make the effort of getting to 100%, it will be much easier to keep it there. This means translating some things that are used rarely (but used nevertheless; otherwise they’d be removed). This means investing a few more days or weeks into translating-translating-translating.

You’ll be able to congratulate yourself not only upon the big accomplishment of getting everything to 100%, but also upon the accomplishments along the way.

One strategy to accomplish this is translating extension by extension. This means, going to your translatewiki.net language statistics: here’s an example with Albanian, but choose your own language. Click “expand” on MediaWiki, then again “expand” on “MediaWiki Extensions”, then on “Extensions used by Wikimedia” and finally, on “Extensions used by Wikimedia – Main”. Similarly to what I described above, find the smaller extensions first and translate them. Once you’re done with all the Main extensions, do all the extensions used by Wikimedia. (Going to all extensions, beyond Extensions used by Wikimedia, helps users of these extensions, but doesn’t help Wikipedia very much.) This strategy can work well if you have several people translating to your language, because it’s easy to divide work by topic.

Another strategy is quiet and friendly competition with other languages. Open the statistics for Extensions Used by Wikimedia – Main and sort the table by the “Completion” column. Find your language. Now translate as many messages as needed to pass the language above you in the list. Then translate as many messages as needed to pass the next language above you in the list. Repeat until you get to 100%.

For example, here’s an excerpt from the statistics for today:

MediaWiki translation stats example

Let’s say that you are translating to Malay. You only need to translate eight messages to go up a notch (901 – 894 + 1). Then six messages more to go up another notch (894 – 888). And so on.

Once you’re done, you will have translated over 3,400 messages, but it’s much easier to do it in small steps.

Once you get to 100% in the main extensions, do the same with all the Extensions Used by Wikimedia. It’s over 10,000 messages, but the same strategies work.

Good Stuff to Do Along the Way

Never assume that the English message is perfect. Never. Do what you can to improve the English messages.

Developers are people just like you are. They may know their code very well, but they may not be the most brilliant writers. And though some messages are written by professional user experience designers, many are written by the developers themselves. Developers are developers; they are not necessarily very good writers or designers, and the messages that they write in English may not be perfect. Keep in mind that many, many MediaWiki developers are not native English speakers; a lot of them are from Russia, Netherlands, India, Spain, Germany, Norway, China, France and many other countries, and English is foreign to them, and they may make mistakes.

So report problems with the English messages to the translatewiki Support page. (Use the opportunity to help other translators who are asking questions there, if you can.)

Another good thing is to do your best to try running the software that you are translating. If there are thousands of messages that are not translated to your language, then chances are that it’s already deployed in Wikipedia and you can try it. Actually trying to use it will help you translate it better.

Whenever relevant, fix the documentation displayed near the translation area. Strange as it may sound, it is possible that you understand the message better than the developer who wrote it!

Before translating a component, review the messages that were already translated. To do this, click the “All” tab at the top of the translation area. It’s useful for learning the current terminology, and you can also improve them and make them more consistent.

After you gain some experience, create a localization guide in your language. There are very few of them at the moment, and there should be more. Here’s the localization guide for French, for example. Create your own with the title “Localisation guidelines/xyz” where “xyz” is your language code.

As in Wikipedia, Be Bold.

OK, So I Got to 100%, What Now?

Well done and congratulations.

Now check the statistics for your language every day. I can’t emphasize how important it is to do this every day.

The way I do this is having a list of links on my translatewiki.net user page. I click them every day, and if there’s anything new to translate, I immediately translate it. Usually there is just a small number of new messages to translate; I didn’t measure precisely, but usually it’s less than 20. Quite often you won’t have to translate from scratch, but to update the translation of a message that changed in English, which is usually even faster.

But what if you suddenly see 200 new messages to translate? It happens occasionally. Maybe several times a year, when a major new feature is added or an existing feature is changed.

Basically, handle it the same way you got to 100% before: step by step, part by part, day by day, week by week, notch by notch, and get back to 100%.

But you can also try to anticipate it. Follow the discussions about new features, check out new extensions that appear before they are added to the Extensions Used by Wikimedia group, consider translating them when you have a few spare minutes. At the worst case, they will never be used by Wikimedia, but they may be used by somebody else who speaks your language, and your translations will definitely feed the translation memory database that helps you and other people translate more efficiently and easily.

Consider also translating other useful projects: OpenStreetMap, Etherpad, Blockly, Encyclopedia of Life, etc. Up to you. The same techniques apply everywhere.

What Do I Get for Doing All This Work?

The knowledge that thanks to you people who read in your language can use Wikipedia without having to learn English. Awesome, isn’t it? Some people call it “Good karma”.

Oh, and enormous experience with software localization, which is a rather useful job skill these days.

Is There Any Other Way in Which I Can Help?

Yes!

If you find this post useful, please translate it to other languages and publish it in your blog. No copyright restrictions, public domain (but it would be nice if you credit me and send me a link to your translation). Make any adaptations you need for your language. It took me years of experience to learn all of this, and it took me about four hours to write it. Translating it will take you much less than four hours, and it will help people be more efficient translators.

Versions of this post were already published in the following languages:

I’m deeply grateful to all the people who made these translations; keep them coming!

23 October, 2020 04:39 PM

02 October, 2020

Gilad Ben-Yossef

תלות גומלין

השליט העליון שכב במיטת בית החולים. הוא התקשה לנשום והתקשה לחשוב. את מעט הריכוז שעוד הצליח לגייס הפרו הצפצופים הדחופים של מכונות הניטור והחמצן. המחלה הארורה השיגה אותו לבסוף. כמו שהזהירו המדענים, החיסון לא עבד. הוא שמח כשנזכר שהורה על הוצאתם להורג. "מה הטעם במדענים", חשב לעצמו בלעג, "אם אינם מועילים בריפוי המגיפה?"

לאט לאט, הנהן בראשו להסכמה. הרופאים ביקשו להרדים ולהנשים אותו. לא היתה ברירה, הם אמרו. בלי זה, הוא לא ישרוד את הלילה. הנהונו גרם לפרץ של פעילות. רופאים ואחיות החלו בשרשרת של סידורים. השליט לא סמך על רופאות ואסר על לימודי רפואה לנשים כבר לפני שנים רבות.

לבסוף שככה הפעילות ורופא זקן ניגש אליו. השליט העליון לא ראה את הרופא הזה קודם אך על פי יחס שאר אנשי הצוות אליו השליט העליון הבין שהוא רופא בכיר. השליט העליון היה טוב מאוד בלקרוא אנשים ומצבים. משהו הטריד אותו ברופא הזה. הרופא הזקן התכופף. השליט העליון הבחין בתואר "פרופסור" על תג השם שלו, אבל לא הצליח להתרכז מספיק כדי לקרוא את השם המלא. הוא לא אהב פרופסורים.

הרופא הזקן הביט בשליט העליון ואז, מבלי להסיר את עיניו ממנו, הנהן. רופא אחר, צעיר יותר, נחפז אל השליט העליון והוא חש דקירה בזרועו. הרופא הזקן נפנף והרופא הצעיר התרחק במהירות.

השליט העליון חש לפתע קור. "מה זה?" ,חשב, "מישהו פתח את החלון?". לא הייתה זאת מחשבה הגיונית, כך ידע, אבל הוא מצא שקשה לו עוד יותר להתרכז. הוא חש עייף. הרופא הזקן התקרב עוד יותר אליו, הביא את פיו לאוזנו, ואמר משהו. השליט העליון ניסה מאוד להתרכז להבין מה נאמר. זה היה קשה מאוד. לבסוף הבין. פיו נפער, אבל אף בת קול לא יצאה. עיניו נעצמו.

"Sic Semper Tyrannis"

02 October, 2020 08:11 AM

10 June, 2020

hatul

המדריך של חתול להתקנת ארץ׳ לינוקס

אני מודע לכך שלא כתבתי יותר משש שנים ואני מקווה שמישהו עוד עוקב אחרי הבלוג. אבל לאחרונה קניתי מחשב חדש וכמובן שהתקנתי עליו ארץ׳ וחשבתי שתיאור התהליך יוכל לעזור למישהו. לי לפחות יוכל לעזור בעתיד לדעת מה בדיוק עשיתי.

למרות הכותרת המפוצצת, לא מדובר על מדריך מלא עם הסברים ובטח לא על מדריך פשוט של העתק־הדבק. חשוב להבין מה אתם עושים ובמחשבים אחרים ייתכן שהפקודות יצטרכו להיות שונות.

בהתקנה התבססתי על שני מדריכים עיקריים:

בתור התחלה, הורדתי את תקליטור ההתקנה של ארץ׳, „צרבתי” אותו על החסן נייד והעליתי את המחשב ממנו.

התחברות לרשת האלחוטית

wifi-menu

או שמתחברים עם כבל לרשת קווית

בדיקה שמחובר:

ping -c3 google.com

עדכון שעון מערכת

timedatectl set-ntp true

חלוקת מחיצות עם fdisk

אצלי כבר היה מותקן אובונטו מהיצרן ולכן השארתי את שתי המחיצות הראשונות של uefi ומחיצת שחזור ומחקתי את המחיצה של אובונטו

fdisk /dev/nvme0n1

יצרתי מחיצה ל־swap של 24G, מחיצת שורש של 30G ומחיצת בית של 175G שנשארו (לפי הסדר הזה)

mkswap /dev/nvme0n1p3
swapon /dev/nvme0n1p3
mkfs.ext4 /dev/nvme0n1p4
mkfs.ext4 /dev/nvme0n1p5

הגדרת מקורות

pacman -Sy reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector -c "IL" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist

עיגון

mount /dev/nvme0n1p4 /mnt
mount /dev/nvme0n1p5 /mnt/home

התקנה

pacstrap /mnt base linux linux-firmware nano intel-ucode

הגדרת fstab

genfstab -U /mnt >> /mnt/etc/fstab

ביצוע chroot

arch-chroot /mnt

הגדרת אזור זמן

ln -sf /usr/share/zoneinfo/Asia/Jerusalem /etc/localtime
hwclock --systohc

הגדרת locale

nano /etc/locale.gen
en_US.UTF-8 UTF-8
he_IL.UTF-8 UTF-8
locale-gen

הגדרת רשת

echo myname > /etc/hostname
nano /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 myname.localdomain myname

הגדרת סיסמה

passwd

התקנת grub

pacman -S grub efibootmgr
mkdir /boot/efi
mount /dev/nvme0n1p1 /boot/efi
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg

יצירת משתמש

useradd -s /bin/bash -g users -G sys,adm,wheel -m user
passwd user

התקנת ממשק גרפי

pacman -S xorg-server xf86-video-intel
pacman -S eog evince file-roller gdm gedit gnome-calculator gnome-color-manager gnome-control-center gnome-disk-utility gnome-font-viewer gnome-keyring gnome-logs gnome-menus gnome-screenshot gnome-session gnome-settings-daemon gnome-shell gnome-shell-extensions gnome-system-monitor gnome-terminal gvfs gvfs-gphoto2 gvfs-mtp mutter nautilus networkmanager simple-scan totem xdg-user-dirs-gtk

לא כל גנום חובה, חלק אני רציתי

להפעיל את השירותים

systemctl enable gdm NetworkManager

הרשאות ניהול

pacman -S sudo
nano /etc/sudoers
%wheel ALL=(ALL) ALL

התקנת yay

pacman -S base-devel wget
wget https://aur.archlinux.org/cgit/aur.git/snapshot/yay-bin.tar.gz
tar -xzf yay-bin.tar.gz
cd yay-bin
makepkg -si

התקנת גופנים לעברית

קצת סיפור להוריד ולבנות את החבילה של הגופנים אז אפשר להוריד אותה מדרייב:

pacman -U ttf-ms-win10-10.0.18362.116-2-any.pkg.tar.xz
yay -S culmus culmus-fancy-ttf ttf-alef

התקנת דפדפנים

pacman -S firefox-i18n-he chromium

התקנת ליברה אופיס

pacman -S libreoffice-fresh-he

עוד כמה תוכנות חשובות בעיני (חלק צריך להגדיר)

libhdate-glib vlc mlocate reflector zsh zsh zsh-completions zoom parcellite

וזהו

reboot

אם התקנתם הכול נכון אז המערכת תעלה ותוכלו להינות ממנה. בהצלחה!

10 June, 2020 10:03 AM

26 May, 2020

Kaplan Open Source Consulting

סדנאות QGIS ביוני 2020

ביחד עם משבר הקורונה, אנשים רבים גילו כי לצד העבודה מהבית הרישיון לתוכנות ה-GIS שלהם נשאר במשרד. סדנאות ה-QGIS שלנו מיועדות למי שרוצה להשתחרר ממגבלות עולם ה-GIS הקנייני ולעבוד עם תוכנה ללא מגבלות על שימוש והתקנות וזאת מבלי לוותר על יכולות של התוכנה.

לצד סדנה בהתאמה אישית לארגונית (דרך zoom בתקופת הקורונה) המאפשרת גמישות מקסימלית של התכנים, אנחנו מפעילים סדנאות חודשיות עם תוכן קבוע. סדנאות QGIS שלנו ביוני 2020:

  1. מה זה QGIS ופלאגאין עבור מידע ישראלי פתוח (17 ביוני, דרך Zoom)
  2. סדנת מבוא ל-QGIS (14 ביוני, דרך Zoom)
  3. סדנת QGIS למתכנני ערים (15 ביוני, דרך Zoom)

סדנאות המבוא מיועדות לאנשים שרוצים לעבוד עם מפות ולבצע ניתוחים מרחביים במסגרת תחומי העיסוק שלהם: כלכלנים, מהנדסות, אדריכלים, מתכננות ערים, אקולוגים, ארכיאולוגיות, גיאולוגים ועוד. הן מיועדת גם למי שלא מכיר GIS או מכיר ברמה בסיסית.

ניתן להשאיר פרטים בטופס ההתעניינות ונחזור אליכם עם פרטים וכיצד להרשם או להצטרף לניוזלטר החודשי שלנו כדי לקבל עדכונים על סדנאות עתידיות.

26 May, 2020 10:15 AM

12 April, 2020

Gilad Ben-Yossef

זכרונות מגלגול קודם בגלקסיה רחוקה

בכנס אייקון 2019 נתתי הרצאה על השורשים הבודהיסטים וטאואיסטים של מסדר הג'די מסדרת סרטי מלחמת הכוכבים. ההרצאה ההיא לא הוקלטה אבל בצוק העיתים וברוח הנדיבות עשיתי שחזור שלה בזום עם כמה א.נשים אמיצים והנה התוצאה לפניכם.

בהרצאה משולבים מספר קטעים קצרים (לצד הסברים שלי) מסדרת הסרטים והזכויות להם שייכים כמובן לחברת דיסני. השימוש בקטעים הוא לצרכי ביאור ונעשה בהבנה שהשימוש נופל תחת החרגת השימוש ההוגן של חוק זכויות היוצרים הישראלי.

מעבר לכך בסוף ההרצאה יש קטע בונוס מיוחד – גילוי של גלגולו הנוכחי של יודה, כאן ועכשיו!

תהנו!

12 April, 2020 03:08 PM

06 December, 2019

Itzik Kotler

Don't Let Your Fear Of Nation-State Hackers Blind You

Mr. Magoo is an old cartoon character famous for his inflated sense of status and an extreme case of myopia, made worse by his refusal to wear corrective glasses. As a result of his poor vision and ego, Magoo would find himself in precarious — and hilarious — situations because he was unable to see the danger right in front of him. Typically, the oblivious Magoo would leave a trail of destruction behind him..

Enterprises today approach security a lot like Mr. Magoo, operating with the idea that they are more important than they really are and therefore are unable to see the real risks that beset them. The result? A lot of unnecessary damage.

Read the full article at Forbes here

Full text

06 December, 2019 09:24 PM

24 October, 2019

Arie Skliarouk

MYSQL/BTRFS/NVME failure

It is a very bad idea to run database (especially production one with lots of I/O) on BTRFS because the filesystem at any random time might become readonly:

Oct 24 12:30:22 db02 kernel: BTRFS: error (device nvme0n1) in btrfs_run_delayed_refs:2936: errno=-28 No space left
Oct 24 12:30:22 db02 kernel: BTRFS info (device nvme0n1): forced readonly
And then you find that you need to do rebalance. You try and find out that rebalance can not be done because - you guessed it - there is no space left. They suggest to delete couple of snapshots though. You delete them, start rebalance and now the whole filesystem is stuck completely.

If you need HA mysql db with snapshots, then you should go with mysq/LVM/DRBD path, see this link for insight: https://rarforge.com/w/index.php/2_Node_Cluster:_Dual_Primary_DRBD_%2B_CLVM_%2B_KVM_%2B_Live_Migrations

24 October, 2019 03:02 PM

23 September, 2019

Itzik Kotler

Demystifying Criminal Hackers

As I write these pieces for Forbes Tech Council, I’ve tried to chip away at the Hollywood reputation that hackers have been given over the years. That reputation often keeps people from making good decisions about how to protect their networks and data, keeps people focused on the wrong security priorities, and causes people to give up before the game is over.

It’s important to keep in mind, however, that while criminal hackers may be smart and devious, they are also, in a sense, entrepreneurs who are in the game to make a quick buck. As such, they realize that hacking costs money and so they will do what they can to keep their operating costs low. Why, then, would you expect a criminal hacker to expend time and money developing specialized tools when there are easier ways to get to what they want?

Read the full article at Forbes here

Full text

23 September, 2019 11:38 PM

31 July, 2018

Lior Kaplan

Debconf18 – יום ראשון

את היום הראשון של הכנס פתחתי כרגיל בדוכן הרשמה (front desk) והייתי שם עד הצהרים כדי שהצוות ירשום את הגל אנשים שהגיעו.

לצערי הכנסים של דביאן נפתחים מאוד בעצלתיים מבחינת תוכן – יש הרצאת/טקס פתיחת ואחרי אין ישר רצף גדול של הרצאות אלא טפטוף קטן של נושאים והרצאות. קצת מאכזב מבחינתי. ומצד שני, אפשר לי להתחיל לעבוד על החבילות של עברית בדביאן בלי לדאוג לפספס תוכן כלשהו. אבל לפני שאפשר לעבוד על החבילות, צריך לייצר סביבה מתאימה. לקח לי זמן להוריד חלודה לגבי מה צריך, ואיך לייצר משהו שיודע לבנות בתוך chroot (גם כדי שהבניה תהיה נקייה, וגם כי אני משתמש ב-testing בעוד שהבניה נעשית ב-unstable). בעזרת כמה תזכורות מ-Bálint הכל הסתדר, ויש סביבה עובדת עם sbuild.

השלב השני היה להתחיל להמיר את ההיסטוריה של הצוות מ-SVN ל-GIT ואז לדחוף את זה לשרת ה-GitLab החדש של דביאן. עשיתי את זה בנפרד עבור כל חבילה, כאשר הראשונה בתור היא Hspell כי צפריר הספיק להכין את הרוב מראש. ואחר כך עבדתי על המרת Culmus כי לא הייתי רוצה שהגרסה הבאה תצא בלי פונטים בעברית (על הדרך כבר הועלתה גרסה 0.132). כל המאגרים זמינים תחת Debian Hebrew Packagers בכתובת https://salsa.debian.org/hebrew-team . למי שצריך לעשות משהו דומה, הכלי להמרה היא git svn clone ואפשר להשתמש בהוראות שיש באתר git-scm.com בכתובת https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git . על בסיס הפקודות שלהם עוד עשיתי כמה שינויים קלים, אבל החלקים החשובים נמצאים שם.

בין לבין שמעתי את הדיווח השנתי של Chris Lamb במסגרת תפקידו כ-Debian Project Leader. בין השאר גיליתי שם כי דביאן תחגוג השנה יום הולדת 25 באמצע אוגוסט, וישר החלטתי לפתוח event כדי לחגוג עם עוד אנשים. נתראה שם בקרוב (: בנוסף, גיליתי כי המעבר של דביאן ל-GitLab נובע בין השאר גם מהשינוי שלהם בנושא ה-Content License Agreement ושינוי ל-Developer Certificate of Origin מה שמאפשר ליותר אנשים לתרום קוד בלי לוותר על הזכויות שלהם או לקרוא מסמך משפטי כבד. שאפו ל-GitLab, ואיזה כיף לעבור לעבוד במערכת מתקדמת.

31 July, 2018 02:40 PM

29 July, 2018

Lior Kaplan

Debconf18 – קדם כנס

הכנס השנתי של דביאן, Debconf, מתקיים השנה בפעם הראשונה באסיה (Hsinchu, Taiwan). הישג מכובד לאחר שנים של אירופה / ארה"ב ולפעמים דרום אמריקה. וגיוון מבורך בהמשך לכנס בדרום אפריקה לפני שנתיים. כלומר הפעם טסים לכנס מזרחה ולכן גם כולם סובלים מג'ט לג חמור יותר. לצערי זה גם גרם לי לתרום הרבה פחות בדוכן הרשמה (front desk) למרות שזה אחת ההתנדבויות הקבועות שלי.

היום הפתוח התנהל בחלקו בסינית, כך שאפילו לא ניסיתי ללכת להרצאות (גם לבודדות שהיו באנגלית), ובמקום זה התמקדתי בקצת שיחות עם אנשים (למרות העייפות). הספקתי לדבר עם Bálint Réczey שעובד עבור Canonical בצוות Ubuntu Foundation שאחראי על הסנכרון עם דביאן והתרומה של שינויים לקהילה. גם ניצלתי את ההזדמנות כדי לשמוע באיזה כלים הם משתמשים בפעילות, כדי לתזכר את עצמי. אחרי כמעט שנה שלא נגעתי בחבילות, אני בהחלט חלוד (וגם צריך לסדר את סביבת העבודה על המחשב). אגב, קנוניקל מחפשים אנשים עובדים, אם מישהו מתעניין, צרו קשר בפרטי (יש אפשרות לעבוד מרחוק, ואוכל לעזור בסידורים הנדרשים).

בהמשך הערב ישבתי על באג שדיווח לקוח על פיצ'ר של PHP שלא עובד לו מול OpenSSL. תפסתי את Kurt Roeckx שאחראי על החבילה בדביאן וגם עושה עבודת upstream בכמה שנים האחרונות כדי לבדוק את הנושא. אחרי קצת שאלות מולו ובדיקות שלי הסתבר שהבעיה היא לא ב-OpenSSL אלא ב-PHP, ואחרי מספיק חיטוטים בקוד נפתח באג #76676.

לאורך היום יצא לי להכיר את הלן (Helen Koike), בחורה נחמדה שסיפרה שהיא לא מעורבת מאוד בדביאן, ובאה ללמוד קצת כי היא הולכת לעזור לצוות המארגן של שנה הבאה. תייגתי אותה כעוד מישהי שעושה עבודה כללית ולא משהו טכני (הקהילה מורכבת גם מכאלה) והמשכתי הלאה. יותר מאוחר בערב, בשיחה רנדומלית גיליתי שהיא עשתה פעילות על הקרנל במסגרת Outreachy, תרמה דריברים, עובדת ב-Collabora בצוות שמתעסק עם הקרנל וכו'. היא פשוט צנועה לאללה. ניסיתי לדחוף אותה לתרומה בצוות קרנל של דביאן והיא אמרה שהיא לא יודעת לארוז חבילות. הסברתי לה שהיא יודעת לתקן באגים בקרנל, וזה תרומה משמעותית לצוות. בנתיים מישהו אחר יכול לארוז. ויותר חשוב לתקן באגים.

במקביל, למדתי כמה מהר אנחנו מתייגים אנשים לפי המקום שנוח לנו לתייג אותם. ומצד שני, שיש אנשים (ויתכן שבעיקר נשים) שהם סופר צנועים ולא מספרים על כל הפעילות והיכולות שלהם וכך דברים מתפספסים (ברושם הראשוני ומעבר).

לסיום הערב, עשיתי תיאום עם צפריר לגבי החבילות של עברית בדביאן שדורשות תשומת לב בעקבות מהעבר מ-Alioth ל-Salsa שעל הדרך סגר את רשימות התפוצה הצוותיות וגם מכריח את כולם לעבור ל-GIT. כאשר המטרה היא לעשות את המיגרציה, לתקן את הבאגים שדווחו מולן כתוצאה מכך, שגם מונעים מהן להכנס ל-testing (ולכן לגרסה הבאה של דביאן). והדבר משמעותי, כי תהליכי ה-freeze מתחילים בספטמבר. בסופו של דבר, אני הולך להקדיש את הזמן לחבילות, בעוד שצפריר יתעסק בדברים אחרים שלו. שזה סה"כ הוגן, כי במהלך השנה לא יצא לי לתרום כלום לתחזוקת החבילות האלה.

מי שרוצה לעקוב אחרי הכנס מרחוק, אז הלוח זמנים נמצא בכתובת https://debconf18.debconf.org/schedule, רק לא לשכוח שהכנס מתקיים באזור זמן +8, כלומר 5 שעות לפני ישראל (ריאלית, אפשר לצפות בהרצאות של אחרי ארוחת הצהריים כאן, שזה 9 בבוקר בישראל).

29 July, 2018 04:17 PM

05 March, 2018

Lior Kaplan

Running for OSI board

After serving in the board of a few technological Israeli associations, I decided to run as an individual candidate in the OSI board elections which starts today. Hoping to add representation outside of North America and Europe. While my main interest is the licensing work, another goal I wish to achieve is to make OSI more relevant for Open Source people on a daily basis, making it more central for communities.

This year there are 12 candidates from 2 individual seats and 5 candidate for 2 affiliate seats (full list at OSI elections wiki page). Wish me luck (:

Full text

05 March, 2018 09:37 AM

28 November, 2017

Lior Kaplan

AGPL enforced: The Israeli ICT authority releases code

Data.gov.il was created in 2011 after the Israeli social justice protests as part of the the public participation initiative and started to offer data held by the government. Back then the website was based on Drupal. In 2016 it was changed to CKAN, a designated system for releasing data. This system is licensed under the AGPLv3 requiring source code availability for anyone who can access the the system over a network, de facto for every user.

Since the change to CKAN, open source people asked the state to release the code according to the license but didn’t get a clear answer. All this time when it’s clear it’s violation.  This led Gai Zomer to file a formal complaint in March 2017 with the Israeli State Comptroller. Absurdly, that same month the ICT authority mentioned a policy to release source code it owns, while failing to release code it has taken from others and adapted.

With the end of the summer break and Jew holidays, and after I wasn’t able to get the source, I decided to switch to legal channels, and with the help of Jonathan Klinger and my company, Kaplan Open Source Consulting, we notified they should provide the source code or we’ll address the court.

Well, it worked. In 3 days time the CKAN extensions where available on the website, but in a problematic way, so users weren’t able to download easily. This is why we decided not to publish this code release and let them fix it first. In addition we made it clear all the source code should be available, not only the extensions. Further more, if they already release it’s recommended to use git format instead of just “dumping” a tarball. So we told them if they aren’t going to make a git repository we’ll do that ourselves, but in any case, would prefer them to do that .

While this issue is still pending, the ICT authority had a conference called “the citizen 360” about e-gov and open government in which they reaffirmed their open source plans.

A slide about open source from the Israeli ICT authority presentation

A slide about open source from the Israeli ICT authority presentation

Now, a month later, after our second letter to them, the about page in data.gov.il was updated with links to the ICT authority GitHub account which has the sources for the website and the extensions. A big improvement, and an important mark point as the commit to the repository was done by an official (gov.il) email address.

Beyond congratulating the Israeli ICT authority for their steps forward and the satisfaction of our insisting on them became fruitful, we would like to see the repository get updated on a regular basis, the code being given back to the various CKAN extensions (e.g. Hebrew translation). In general, we hope they would to get inspired by how the how data.gov.uk is doing technical transparency. If we allow ourselves to dream, we would like to see Israel becoming a dominate member in the CKAN community and among the other governments who use it.

We’re happy to be the catalyst for open source in the Israeli government, and we promise to keep insisted where needed. We know that due to other requests and notifications more organizations are on their way to release code.

(This post is a translation from Hebrew of a post in Kaplan Open Source Consulting at https://kaplanopensource.co.il/2017/11/20/data-gov-il-code-release/)

Full text

28 November, 2017 09:07 AM

18 June, 2017

Amir Aharoni

סיסמה

אז לפתע פתאום האקדמיה ללשון שינתה את כללי הכתיב.

הופתעתי מאוד מהשינוי של היום. אולי היו על זה ידיעות בפרסומים של האקדמיה, אבל למרות שאני מתעניין בלשון בכלל, ובכללי הכתיב בפרט, אינני עוקב אחרי כולם. למשל, בדיוק לפני מספר חודשים האקדמיה ללשון הקטלאנית הודיעה שהיא מתכננת לפשט את כללי הכתיב ולבטל הרבה מהסימנים מעל האותיות, אבל היא פרסמה טיוטה לדיון ציבורי, ולא הודיעה ישר על השינוי. (ויש דיון ציבורי, כי לאנשים אכפת מזה.)

אילו האקדמיה ללשון העברית פרסמה טיוטה, הייתי מעיר כמה דברים. אני אישית לא אוהב את הגושפנקה שניתנה ל„שיער”, „בריכה”, „ברירה”, ו„עבירה”, אבל בסדר, אני מבין שזה נפוץ, ואני אפילו שמח מאוד שאני לא צריך לבזבז את העצבים שלי על ויכוחים בנושא הזה. עם זאת, הכתיב החדש „מייד” מצער: גם הכתיב „מיד” היה נפוץ למדי, ולא עורר הרבה מחלוקות, והוא שמר על הקשר למילה „יד”.

אני הקפדתי מאוד על „ססמה” בתרגומי פיירפוקס וטוויטר, למרות התנגדויות רבות, ועכשיו זה בהדרגה יהפוך ל„סיסמה”. על זה לא חבל לי כל־כך, כי זאת ממילא מילה שאולה מובהקת, גם אם עתיקה, ואם אתם שואלים אותי, אפשר להוסיף יו״ד גם למילים שמיות מובהקות כמו פסגה, קדמה, וכיו״ב.

טיפ־טיפה חבל לי על הכתיב „שמים”, שעכשיו הפך ל„שמיים”. היה בזה דמיון יפה ל„מים”, אבל בסדר. עכשיו אני יכול להפסיק להחרים את יישום „ירושמיים”, שהפכה כבר מזמן למשהו פולחני עבור ירושלמים רבים.

אני מרוצה מהשינוי של „תכנה” ו„יזמה” ל„תוכנה” ו„יוזמה”. אני גם מרוצה למדי מהשינוי של מילות היחס „אתי, אתך” ל„איתי, איתך”, ושל „עתים” ל„עיתים”, אבל מוזר לי ביותר שלא נוספה בהזדמנות הזאת האות יו״ד למילים כמו „אִגרוף” ו„מִחזור”, כדי לא להתבלבל עם „אֶגרוף” ו„מַחזור”. זה היה יכול להיות כלל פשוט ושימושי, והוא ממש לא היה אמור להיות שנוי במחלוקת. חבל שזה התפספס.

עוד משעשעים אותי ה„אישורים” שנינתו למילה „אומנם” וליו״ד בצורת הגוף הראשון בזמן עתיד בבניין נפעל, למשל „איכנס” במקום „אכנס”. אני תמיד כתבתי אותם בכתיב מלא. את „אומנם” כתבתי בווי״ו כי גם „אֻמנם” הוא ניקוד תקני ולא רק „אָמנם”, וצליל u תמיד אמור להיכתב בווי״ו (אם כי עכשיו גיליתי לראשונה שהניקוד „אֻמנם” מיועד לשאלות, לפחות לפי אבן־שושן). ובבניין נפעל כתבתי תמיד „איכנס”, „איזהר”, וכו׳, כי הניקוד בחיריק תקין כמו בניקוד בסגול (ר׳ למשל גזניוס 51p).

טוב שיש עכשיו גושפנקה למילה „תיאטרון”, כי אני לא מכיר שום תיאטרון ישראלי שבכניסה עליו כתוב „תאטרון”. (אם יש כזה, זה מפדח למדי, אז עדיף שפשוט אודה: אני לא הולך להצגות מספיק.) מצד שני, מוזאון עדיין אמור להיכתב בלי יו״ד. אני אוהב את החלוקה החדשה הזאת, אבל יש לי תחושה שמוזאונים ימשיכו לקרוא לעצמם „מוזיאונים”, אם כי אפשר לשם השעשוע לנסות להחיות את המילה „בית נכאת”.

מעטים ישימו לב לזה, אבל עכשיו המילה „די” תיכתב תמיד ביו״ד אחת. גם ככה רוב האנשים כותבים אותה ביו״ד אחת, וזה תמיד היה נכון, אבל משום־מה האקדמיה אפשרה עד עכשיו גם „דיי” ו„דאי”. אפילו ראיתי את „דיי” בספרים שהאקדמיה הוציאה ממש לאחרונה (כמו „העברית בתקופת המנדט” הנהדר של יעל רשף). אבל זהו, לא עובד: רק „די”, וטוב שכך.

עוד דבר שמעטים ישימו לב אליו הוא השם של הכללים החדשים: „כללי הכתיב המלא”. עד עכשיו הם נקראו „כללי הכתיב חסר־הניקוד”. למיטב ידיעתי, המונחים כתיב מלא וכתיב חסר מעולם לא היו מוגדרים באופן מדויק למרות שאנשים רבים השתמשו בהם. „כתיב חסר” עדיין אינו מוגדר, אבל זה בסדר, כי הוא לא ממש נחוץ.

עכשיו יהיה ממש נחמד לעדכן גם את מילון האיות החופשי Hspell. נדב ודן, אם אתם קוראים את זה, אני אשמח לעזור.

18 June, 2017 11:03 AM

18 October, 2016

PyCon Israel

Pycon Israel 2016 wrap up

A little less than six months ago, we held the first PyCon in Israel. To our dismay, it took us this long to post all the videos from the event, but now they’re finally up, and you can finally catch up on The Track Not Taken.

We’d like to take this opportunity to clear the 2016 table and summarize the conference, to give it some closure.

The conference was a lot of work and fun to organize, and truly wonderful to witness. We’ve had:

Over and beyond the hard data, there was a great feeling of a community coming together.

There’s a few points we want to discuss in more details:

Diversity

We made a conscious effort to make the conference more welcoming to diverse populations. This included a well-defined Code of Conduct, as well as reaching out to specific communities, which are usually underrepresented in technical conferences. This included, of course, the cooperation with Django Girls Tel Aviv, who were invited to the conference; we did not collect the statistics of visitor gender, but we have reason to believe it was significantly more balanced than usual. We also reached out to some other groups who were less clearly visible. By all the feedback we got, everybody felt very welcome.

To our regret, we could not show the same level of diversity among the speakers. Only 3 of the 32 accepted talks were presented by women, and none of these were Israeli. Further, we did not have a travel-support plan for speakers, and partly as a result of that, we did not have any speaker from the less-privileged parts of the world. We still have some way to go there.

We intend to keep pursuing diversity in future editions of PyCon Israel.

Budget

In the spirit of Open Source and transparency, we’re happy to share a summary of our budget (all numbers are thousands of Shekels).

Income

Sponsorship: 246

Ticket sales: 54

Total: 300

Expenses

Venue (incl. food): 134

Conf. party (food+movie): 41

Keynote speakers travel: 30

Speaker’s dinner: 13

Video recording & editing: 20

T-shirts & other swag: 28

Wireless internet: 5

Various other: 3

Total: 274

As you can see, we ended with a positive balance of close to 26K ILS. This is more than we intended, a miss we attribute to over-cautiousness and inexperience. A small part of this surplus will go to support Hamakor, the Israeli F/OSS association which helped make the conference happen, and the rest will go into the budget of the next PyCon Israel.

Community organizations

We’d like to call out three special groups which could use your help — participation as well as sponsorship; groups whose ongoing work enabled this conference and will hopefully enable others like it in the future:

2017

Since so long has passed, we can also add a look to the future: Preparations for PyCon Israel 2017 have already started! You can join the organizing team, or just keep track of our progress via our different channels -

Blog: https://medium.com/@pyconil

Twitter: @pyconil, #pyconil

YouTube channel: https://www.youtube.com/channel/UC8ApA9ibgkf0XK7lgTVZgEQ

Facebook: https://www.facebook.com/pyconisrael/

Google group: https://groups.google.com/forum/#!forum/pycon-israel (requires registration)

Website: http://il.pycon.org/

Final words

Watching the months of preparations come to full fruition made our hearts burst with joy. We’d like to thank everyone involved — all CFP submission authors, the invited and accepted speakers, the sponsors (and in particular the Diamond sponsors, Red Hat & Cymmetria), the vendors (and in particular the helpful staff of our wonderful venue at Yes Planet), the Israeli Python community in general for making such an event possible, and you, the attendees, for making it a reality.

See you in 2017,

The PyCon Israel organizing team

18 October, 2016 07:45 PM

23 September, 2016

Yosef Or Boczko

GNOME 3.22 שוחרר !

צהריים טובים.

לאחר מחזור פיתוח בן שישה חודשים, שוחררה גרסה 3.22 של שולחן העבודה GNOME !

GNOME 3.22 Hebrew

גרסה זו מכילה 22980 שינויים שנרשמו ב־Git על ידי 775 תורמים, בהשוואה ל־28933 שינויים על ידי 837 תורמים ב־3.20.

אחוז התרגום עומד על 80% (36912 מחרוזות מתורגמות, 3682 מעורפלות ו־49874 שאינן מתורגמות), בהשוואה ל־80% (36069 מחרוזות מתורגמות, 3702 מעורפלות ו־4937 שאינן מתורגמות) ב־3.20 ו־82% (37120 מחרוזות מתורגמות, 3326 מעורפלות ו־4675 שאינן מתורגמות) ב־3.18.

על התרגום בעיקר אני אחראי, ולאחרונה הצטרף ניב באר ותרגם את חלק מהתיעוד למשתמש „צעדים חדשים ב־GNOME” (נקרא ‏gnome-getting-started-docs) ואפילו החל לתרגם ליישומים (טרם מצאתי זמן להכניס את התרגומים האחרונים שלו).

להלן מוטמע סרטון המציג את GNOME 3.22. קריינות על ידי קארן סנדלר, לשעבר מנכ״ל קרן GNOME, ומייק טרנטינו. עריכה על ידי Bastian Ilsø, שעורך סרטונים אלו כבר למספר שחרורים.

כרגיל, אוסיף כאן שיר. שיר יפה, שפשוט נהניתי לנגן על הפסנתר.

בברכה,

יוסף אור

23 September, 2016 02:47 PM

14 August, 2016

Yosef Or Boczko

מצב תרגום GNOME – לקראת 3.22

ערב טוב.

בשבוע האחרון תרגמתי ובכך צמצמתי פערים של חצי שנה ללא תרגום, והבאתי את GNOME לתרגום מלא (להוציא את gitg ואת gnome-builder, שלא תורגמו גם בגרסה הקודמת).

אחוז התרגום עומד על 80% (36915 מחרוזות מתורגמות, 3727 מעורפלות ו־4987 שאינן מתורגמות), בהשוואה ל־80% (36069 מחרוזות מתורגמות, 3702 מעורפלות ו־4937 שאינן מתורגמות) ב־3.20 ו־82% (37120 מחרוזות מתורגמות, 3326 מעורפלות ו־4675 שאינן מתורגמות) ב־3.18.

לאחר עלייה במספר המחרוזות שאינן מתורגמות נתן לראות התייצבות מספר זה, לצד עלייה חוזרת במספר המחרוזות המתורגמות. הבטחֲתי היא כי GNOME מתורגם באופן מלא. כלומר, להוציא שני היישומים שצוינו לעיל – המשתמש לא יפגוש במחרוזות שאינן מתורגמות.

ניתן לקרוא טיוטת הערות השחרור לגרסה זו של GNOME. גם הפעם לא אסקר השינויים, מקוצר בזמן.

את השיר, הפעם, אקדיש ליום המיוחד, לגעגוע לירושלים.

ערב טוב,

יוסף אור

 

14 August, 2016 04:05 PM